org.apache.avro.mapreduce

## Class AvroKeyRecordReader<T>

- java.lang.Object
- - org.apache.hadoop.mapreduce.RecordReader<K,V>
  - - org.apache.avro.mapreduce.AvroRecordReaderBase<AvroKey<T>,NullWritable,T>
    - - org.apache.avro.mapreduce.AvroKeyRecordReader<T>

Type Parameters:
  `T` - The (java) type of data in Avro container file.

All Implemented Interfaces:
  Closeable, AutoCloseable

    public class AvroKeyRecordReader<T>
    extends AvroRecordReaderBase<AvroKey<T>,NullWritable,T>

Reads records from an input split representing a chunk of an Avro container file.

### Constructor Summary

Constructors
Constructor and Description
`AvroKeyRecordReader(org.apache.avro.Schema readerSchema)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`AvroKey<T>` `getCurrentKey()`
`NullWritable` `getCurrentValue()`
`boolean` `nextKeyValue()`

### Methods inherited from class org.apache.avro.mapreduce.AvroRecordReaderBase

`close, createAvroFileReader, createSeekableInput, getCurrentRecord, getProgress, initialize`

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

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

### Constructor Detail

#### AvroKeyRecordReader

    public AvroKeyRecordReader(org.apache.avro.Schema readerSchema)

Constructor.

Parameters:
  `readerSchema` - The reader schema to use for the records in the Avro container file.

### Method Detail

#### nextKeyValue

    public boolean nextKeyValue()
                         throws IOException,
                                InterruptedException

Overrides:
  `nextKeyValue` in class `AvroRecordReaderBase<AvroKey<T>,NullWritable,T>`
Throws:
  `IOException`
  `InterruptedException`

#### getCurrentKey

    public AvroKey<T> getCurrentKey()
                             throws IOException,
                                    InterruptedException

Specified by:
  `getCurrentKey` in class `RecordReader<AvroKey<T>,NullWritable>`
Throws:
  `IOException`
  `InterruptedException`

#### getCurrentValue

    public NullWritable getCurrentValue()
                                 throws IOException,
                                        InterruptedException

Specified by:
  `getCurrentValue` in class `RecordReader<AvroKey<T>,NullWritable>`
Throws:
  `IOException`
  `InterruptedException`