public class SortedKeyValueFile extends Object
The SortedKeyValueFile is a directory with two files, named 'data' and 'index'. The 'data' file is an ordinary Avro container file with records. Each record has exactly two fields, 'key' and 'value'. The keys are sorted lexicographically. The 'index' file is a small Avro container file mapping keys in the 'data' file to their byte positions. The index file is intended to fit in memory, so it should remain small. There is one entry in the index file for each data block in the Avro container file.
SortedKeyValueFile is to Avro container file as MapFile is to SequenceFile.
Modifier and Type | Class and Description |
---|---|
static class |
SortedKeyValueFile.Reader<K,V>
Reads a SortedKeyValueFile by loading the key index into memory.
|
static class |
SortedKeyValueFile.Writer<K,V>
Writes a SortedKeyValueFile.
|
Modifier and Type | Field and Description |
---|---|
static String |
DATA_FILENAME
The name of the data file within the SortedKeyValueFile directory.
|
static String |
INDEX_FILENAME
The name of the index file within the SortedKeyValueFile directory.
|
Constructor and Description |
---|
SortedKeyValueFile() |
public static final String DATA_FILENAME
public static final String INDEX_FILENAME
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.