K
- The type of the Avro key to read.V
- The type of the Avro value to read.public class AvroKeyValueInputFormat<K,V> extends FileInputFormat<AvroKey<K>,AvroValue<V>>
Avro container files that container generic records with the two fields 'key' and 'value' are expected. The contents of the 'key' field will be used as the job input key, and the contents of the 'value' field will be used as the job output value.
FileInputFormat.Counter
DEFAULT_LIST_STATUS_NUM_THREADS, INPUT_DIR, INPUT_DIR_RECURSIVE, LIST_STATUS_NUM_THREADS, NUM_INPUT_FILES, PATHFILTER_CLASS, SPLIT_MAXSIZE, SPLIT_MINSIZE
Constructor and Description |
---|
AvroKeyValueInputFormat() |
Modifier and Type | Method and Description |
---|---|
RecordReader<AvroKey<K>,AvroValue<V>> |
createRecordReader(InputSplit split,
TaskAttemptContext context) |
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, listStatus, makeSplit, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
public RecordReader<AvroKey<K>,AvroValue<V>> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
createRecordReader
in class InputFormat<AvroKey<K>,AvroValue<V>>
IOException
InterruptedException
Copyright © 2009–2016 The Apache Software Foundation. All rights reserved.