org.apache.avro.mapreduce

## Class AvroKeyInputFormat<T>

- java.lang.Object
- - org.apache.hadoop.mapreduce.InputFormat<K,V>
  - - org.apache.hadoop.mapreduce.lib.input.FileInputFormat<AvroKey<T>,NullWritable>
    - - org.apache.avro.mapreduce.AvroKeyInputFormat<T>

    public class AvroKeyInputFormat<T>
    extends FileInputFormat<AvroKey<T>,NullWritable>

A MapReduce InputFormat that can handle Avro container files.

Keys are AvroKey wrapper objects that contain the Avro data. Since Avro container files store only records (not key/value pairs), the value from this InputFormat is a NullWritable.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat

`FileInputFormat.Counter`

### Field Summary

### Fields inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat

`DEFAULT_LIST_STATUS_NUM_THREADS, INPUT_DIR, INPUT_DIR_NONRECURSIVE_IGNORE_SUBDIRS, INPUT_DIR_RECURSIVE, LIST_STATUS_NUM_THREADS, NUM_INPUT_FILES, PATHFILTER_CLASS, SPLIT_MAXSIZE, SPLIT_MINSIZE`

### Constructor Summary

Constructors
Constructor and Description
`AvroKeyInputFormat()`

### Method Summary

All Methods Instance Methods Concrete Methods
`RecordReader<AvroKey<T>,NullWritable>` `createRecordReader(InputSplit split, TaskAttemptContext context)`

### Methods inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat

`addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, isSplitable, listStatus, makeSplit, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize`

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

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

### Constructor Detail

#### AvroKeyInputFormat

    public AvroKeyInputFormat()

### Method Detail

#### createRecordReader

    public RecordReader<AvroKey<T>,NullWritable> createRecordReader(InputSplit split,
                                                                    TaskAttemptContext context)
                                                             throws IOException,
                                                                    InterruptedException

Specified by:
  `createRecordReader` in class `InputFormat<AvroKey<T>,NullWritable>`
Throws:
  `IOException`
  `InterruptedException`