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>

    public class AvroInputFormat<T>
    extends FileInputFormat<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

Fields
`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.

### Fields inherited from class org.apache.hadoop.mapred.FileInputFormat

`INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS, INPUT_DIR_RECURSIVE, LOG, NUM_INPUT_FILES`

### Constructor Summary

Constructors
Constructor and Description
`AvroInputFormat()`

### Method Summary

All Methods Instance Methods Concrete Methods
`RecordReader<AvroWrapper<T>,NullWritable>` `getRecordReader(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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### IGNORE_FILES_WITHOUT_EXTENSION_KEY

    public static final String IGNORE_FILES_WITHOUT_EXTENSION_KEY

Whether to silently ignore input files without the .avro extension

See Also:
  Constant Field Values

#### IGNORE_INPUTS_WITHOUT_EXTENSION_DEFAULT

    public static final boolean IGNORE_INPUTS_WITHOUT_EXTENSION_DEFAULT

Default of whether to silently ignore input files without the .avro extension.

See Also:
  Constant Field Values

### Constructor Detail

#### AvroInputFormat

    public AvroInputFormat()

### Method Detail

#### listStatus

    protected FileStatus[] listStatus(JobConf job)
                               throws IOException

Overrides:
  `listStatus` in class `FileInputFormat<AvroWrapper<T>,NullWritable>`
Throws:
  `IOException`

#### getRecordReader

    public RecordReader<AvroWrapper<T>,NullWritable> getRecordReader(InputSplit split,
                                                                     JobConf job,
                                                                     Reporter reporter)
                                                              throws IOException

Specified by:
  `getRecordReader` in interface `InputFormat<AvroWrapper<T>,NullWritable>`
Specified by:
  `getRecordReader` in class `FileInputFormat<AvroWrapper<T>,NullWritable>`
Throws:
  `IOException`