Package org.apache.trevni.avro.mapreduce
Class AvroTrevniKeyValueRecordReader<K,V>
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<AvroKey<K>,AvroValue<V>>
org.apache.trevni.avro.mapreduce.AvroTrevniRecordReaderBase<AvroKey<K>,AvroValue<V>,GenericRecord>
org.apache.trevni.avro.mapreduce.AvroTrevniKeyValueRecordReader<K,V>
- Type Parameters:
K
- The type of the Avro key to read.V
- The type of the Avro value to read.
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class AvroTrevniKeyValueRecordReader<K,V>
extends AvroTrevniRecordReaderBase<AvroKey<K>,AvroValue<V>,GenericRecord>
Reads Trevni generic records from an Trevni container file, where the records
contain two fields: 'key' and 'value'.
The contents of the 'key' field will be parsed into an AvroKey object. The contents of the 'value' field will be parsed into an AvroValue object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Methods inherited from class org.apache.trevni.avro.mapreduce.AvroTrevniRecordReaderBase
close, getCurrentRecord, getProgress, initialize
-
Constructor Details
-
AvroTrevniKeyValueRecordReader
public AvroTrevniKeyValueRecordReader()
-
-
Method Details
-
getCurrentKey
- Specified by:
getCurrentKey
in classRecordReader<AvroKey<K>,
AvroValue<V>> - Throws:
IOException
InterruptedException
-
getCurrentValue
- Specified by:
getCurrentValue
in classRecordReader<AvroKey<K>,
AvroValue<V>> - Throws:
IOException
InterruptedException
-
nextKeyValue
- Overrides:
nextKeyValue
in classAvroTrevniRecordReaderBase<AvroKey<K>,
AvroValue<V>, GenericRecord> - Throws:
IOException
InterruptedException
-