Package org.apache.avro.mapred

# Class AvroRecordReader<T>

java.lang.Object
org.apache.avro.mapred.AvroRecordReader<T>

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `RecordReader<AvroWrapper<T>,NullWritable>`

Direct Known Subclasses:
  `SequenceFileRecordReader`

public class AvroRecordReader<T> extends Object implements RecordReader<AvroWrapper<T>,NullWritable>
An `RecordReader` for Avro data files.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AvroRecordReader(org.apache.avro.file.FileReader<T> reader, FileSplit split)`
``
`AvroRecordReader(JobConf job, FileSplit split)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`AvroWrapper<T>`
`createKey()`
`NullWritable`
`createValue()`
`long`
`getPos()`
`float`
`getProgress()`
`boolean`
`next(AvroWrapper<T> wrapper, NullWritable ignore)`

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

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

## Constructor Details

### AvroRecordReader

public AvroRecordReader(JobConf job, FileSplit split) throws IOException

Throws:
  `IOException`

### AvroRecordReader

protected AvroRecordReader(org.apache.avro.file.FileReader<T> reader, FileSplit split) throws IOException

Throws:
  `IOException`

## Method Details

### createKey

public AvroWrapper<T> createKey()

Specified by:
  `createKey` in interface `RecordReader<AvroWrapper<T>,NullWritable>`

### createValue

public NullWritable createValue()

Specified by:
  `createValue` in interface `RecordReader<AvroWrapper<T>,NullWritable>`

### next

public boolean next(AvroWrapper<T> wrapper, NullWritable ignore) throws IOException

Specified by:
  `next` in interface `RecordReader<AvroWrapper<T>,NullWritable>`
Throws:
  `IOException`

### getProgress

public float getProgress() throws IOException

Specified by:
  `getProgress` in interface `RecordReader<AvroWrapper<T>,NullWritable>`
Throws:
  `IOException`

### getPos

public long getPos() throws IOException

Specified by:
  `getPos` in interface `RecordReader<AvroWrapper<T>,NullWritable>`
Throws:
  `IOException`

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `RecordReader<AvroWrapper<T>,NullWritable>`
Throws:
  `IOException`