|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.hadoop.file.SortedKeyValueFile
public class SortedKeyValueFile
A SortedKeyValueFile is an indexed Avro container file of KeyValue records sorted by key.
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.
| Nested Class Summary | |
|---|---|
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. |
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
SortedKeyValueFile()
|
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DATA_FILENAME
public static final String INDEX_FILENAME
| Constructor Detail |
|---|
public SortedKeyValueFile()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||