public class AvroTrevniKeyInputFormat<T> extends FileInputFormat<AvroKey<T>,NullWritable>
InputFormat
for Trevni files.
This implement was modeled off
AvroKeyInputFormat
to allow for easy
transition
A MapReduce InputFormat that can handle Trevni container files.
Keys are AvroKey wrapper objects that contain the Trevni data. Since Trevni container files store only records (not key/value pairs), the value from this InputFormat is a NullWritable.
A subset schema to be read may be specified with
AvroJob.setInputKeySchema(org.apache.hadoop.mapreduce.Job, org.apache.avro.Schema)
.
FileInputFormat.Counter
Constructor and Description |
---|
AvroTrevniKeyInputFormat() |
Modifier and Type | Method and Description |
---|---|
RecordReader<AvroKey<T>,NullWritable> |
createRecordReader(InputSplit split,
TaskAttemptContext context) |
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
public RecordReader<AvroKey<T>,NullWritable> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
createRecordReader
in class InputFormat<AvroKey<T>,NullWritable>
IOException
InterruptedException
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.