This project has retired. For details please refer to its
Attic page.
AvroRecordReader (Apache Crunch 0.4.0-incubating API)
org.apache.crunch.types.avro
Class AvroRecordReader<T>
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
org.apache.crunch.types.avro.AvroRecordReader<T>
- All Implemented Interfaces:
- Closeable
public class AvroRecordReader<T>
- extends org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
An RecordReader
for Avro data files.
AvroRecordReader
public AvroRecordReader(org.apache.avro.Schema schema)
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
- Specified by:
initialize
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
InterruptedException
nextKeyValue
public boolean nextKeyValue()
throws IOException,
InterruptedException
- Specified by:
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
InterruptedException
getCurrentKey
public org.apache.avro.mapred.AvroWrapper<T> getCurrentKey()
throws IOException,
InterruptedException
- Specified by:
getCurrentKey
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<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<org.apache.avro.mapred.AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
InterruptedException
getProgress
public float getProgress()
throws IOException
- Specified by:
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
getPos
public long getPos()
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.avro.mapred.AvroWrapper<T>,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.