Package org.apache.avro.mapred
Class AvroInputFormat<T>
java.lang.Object
org.apache.hadoop.mapred.FileInputFormat<AvroWrapper<T>,NullWritable>
org.apache.avro.mapred.AvroInputFormat<T>
- All Implemented Interfaces:
InputFormat<AvroWrapper<T>,
NullWritable>
An
InputFormat
for Avro data files.
By default, when pointed at a directory, this will silently skip over any
files in it that do not have .avro extension. To instead include all files,
set the avro.mapred.ignore.inputs.without.extension property to false.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapred.FileInputFormat
FileInputFormat.Counter
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Whether to silently ignore input files without the .avro extensionstatic final boolean
Default of whether to silently ignore input files without the .avro extension.Fields inherited from class org.apache.hadoop.mapred.FileInputFormat
INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS, INPUT_DIR_RECURSIVE, LOG, NUM_INPUT_FILES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRecordReader
(InputSplit split, JobConf job, Reporter reporter) protected FileStatus[]
listStatus
(JobConf job) Methods inherited from class org.apache.hadoop.mapred.FileInputFormat
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, getSplits, isSplitable, makeSplit, makeSplit, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize
-
Field Details
-
IGNORE_FILES_WITHOUT_EXTENSION_KEY
Whether to silently ignore input files without the .avro extension- See Also:
-
IGNORE_INPUTS_WITHOUT_EXTENSION_DEFAULT
public static final boolean IGNORE_INPUTS_WITHOUT_EXTENSION_DEFAULTDefault of whether to silently ignore input files without the .avro extension.- See Also:
-
-
Constructor Details
-
AvroInputFormat
public AvroInputFormat()
-
-
Method Details
-
listStatus
- Overrides:
listStatus
in classFileInputFormat<AvroWrapper<T>,
NullWritable> - Throws:
IOException
-
getRecordReader
public RecordReader<AvroWrapper<T>,NullWritable> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException - Specified by:
getRecordReader
in interfaceInputFormat<AvroWrapper<T>,
NullWritable> - Specified by:
getRecordReader
in classFileInputFormat<AvroWrapper<T>,
NullWritable> - Throws:
IOException
-