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
ModifierConstructorDescriptionprotected
AvroRecordReader
(FileReader<T> reader, FileSplit split) AvroRecordReader
(JobConf job, FileSplit split) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
getPos()
float
boolean
next
(AvroWrapper<T> wrapper, NullWritable ignore)
-
Constructor Details
-
AvroRecordReader
- Throws:
IOException
-
AvroRecordReader
- Throws:
IOException
-
-
Method Details
-
createKey
- Specified by:
createKey
in interfaceRecordReader<AvroWrapper<T>,
NullWritable>
-
createValue
- Specified by:
createValue
in interfaceRecordReader<AvroWrapper<T>,
NullWritable>
-
next
- Specified by:
next
in interfaceRecordReader<AvroWrapper<T>,
NullWritable> - Throws:
IOException
-
getProgress
- Specified by:
getProgress
in interfaceRecordReader<AvroWrapper<T>,
NullWritable> - Throws:
IOException
-
getPos
- Specified by:
getPos
in interfaceRecordReader<AvroWrapper<T>,
NullWritable> - Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceRecordReader<AvroWrapper<T>,
NullWritable> - Throws:
IOException
-