public class AvroInputFormat<T> extends FileInputFormat<AvroWrapper<T>,NullWritable>
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.FileInputFormat.Counter
Modifier and Type | Field and Description |
---|---|
static String |
IGNORE_FILES_WITHOUT_EXTENSION_KEY
Whether to silently ignore input files without the .avro extension
|
static boolean |
IGNORE_INPUTS_WITHOUT_EXTENSION_DEFAULT
Default of whether to silently ignore input files without the .avro
extension.
|
INPUT_DIR_RECURSIVE, LOG, NUM_INPUT_FILES
Constructor and Description |
---|
AvroInputFormat() |
Modifier and Type | Method and Description |
---|---|
RecordReader<AvroWrapper<T>,NullWritable> |
getRecordReader(InputSplit split,
JobConf job,
Reporter reporter) |
protected FileStatus[] |
listStatus(JobConf job) |
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, getSplits, isSplitable, makeSplit, makeSplit, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize
public static final String IGNORE_FILES_WITHOUT_EXTENSION_KEY
public static final boolean IGNORE_INPUTS_WITHOUT_EXTENSION_DEFAULT
protected FileStatus[] listStatus(JobConf job) throws IOException
listStatus
in class FileInputFormat<AvroWrapper<T>,NullWritable>
IOException
public RecordReader<AvroWrapper<T>,NullWritable> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException
getRecordReader
in interface InputFormat<AvroWrapper<T>,NullWritable>
getRecordReader
in class FileInputFormat<AvroWrapper<T>,NullWritable>
IOException
Copyright © 2009–2017 The Apache Software Foundation. All rights reserved.