org.apache.avro.mapreduce
Class AvroKeyRecordReader<T>
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<K,V>
org.apache.avro.mapreduce.AvroRecordReaderBase<AvroKey<T>,org.apache.hadoop.io.NullWritable,T>
org.apache.avro.mapreduce.AvroKeyRecordReader<T>
- Type Parameters:
T - The (java) type of data in Avro container file.
- All Implemented Interfaces:
- Closeable
public class AvroKeyRecordReader<T>
- extends AvroRecordReaderBase<AvroKey<T>,org.apache.hadoop.io.NullWritable,T>
Reads records from an input split representing a chunk of an Avro container file.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroKeyRecordReader
public AvroKeyRecordReader(org.apache.avro.Schema readerSchema)
- Constructor.
- Parameters:
readerSchema - The reader schema to use for the records in the Avro container file.
nextKeyValue
public boolean nextKeyValue()
throws IOException,
InterruptedException
-
- Overrides:
nextKeyValue in class AvroRecordReaderBase<AvroKey<T>,org.apache.hadoop.io.NullWritable,T>
- Throws:
IOException
InterruptedException
getCurrentKey
public AvroKey<T> getCurrentKey()
throws IOException,
InterruptedException
-
- Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<AvroKey<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
InterruptedException
getCurrentValue
public org.apache.hadoop.io.NullWritable getCurrentValue()
throws IOException,
InterruptedException
-
- Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<AvroKey<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
InterruptedException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.