org.apache.avro.mapred
Class AvroRecordReader<T>
java.lang.Object
org.apache.avro.mapred.AvroRecordReader<T>
- All Implemented Interfaces:
- org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
- Direct Known Subclasses:
- SequenceFileRecordReader
public class AvroRecordReader<T>
- extends Object
- implements org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
An RecordReader
for Avro data files.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroRecordReader
public AvroRecordReader(org.apache.hadoop.mapred.JobConf job,
org.apache.hadoop.mapred.FileSplit split)
throws IOException
- Throws:
IOException
AvroRecordReader
protected AvroRecordReader(FileReader<T> reader,
org.apache.hadoop.mapred.FileSplit split)
throws IOException
- Throws:
IOException
createKey
public AvroWrapper<T> createKey()
- Specified by:
createKey
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
createValue
public NullWritable createValue()
- Specified by:
createValue
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
next
public boolean next(AvroWrapper<T> wrapper,
NullWritable ignore)
throws IOException
- Specified by:
next
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
- Throws:
IOException
getProgress
public float getProgress()
throws IOException
- Specified by:
getProgress
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
- Throws:
IOException
getPos
public long getPos()
throws IOException
- Specified by:
getPos
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface org.apache.hadoop.mapred.RecordReader<AvroWrapper<T>,NullWritable>
- Throws:
IOException
Copyright © 2010 The Apache Software Foundation