org.apache.pig.impl.util.avro
Class AvroArrayReader
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
org.apache.pig.impl.util.avro.AvroArrayReader
- All Implemented Interfaces:
- Closeable
public final class AvroArrayReader
- extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
RecordReader for Avro files
|
Constructor Summary |
AvroArrayReader(org.apache.avro.Schema s)
Creates new instance of AvroRecordReader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroArrayReader
public AvroArrayReader(org.apache.avro.Schema s)
- Creates new instance of AvroRecordReader.
- Parameters:
s - The input schema.
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Specified by:
close in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
- Throws:
IOException
getCurrentValue
public org.apache.avro.generic.GenericData.Record getCurrentValue()
throws IOException,
InterruptedException
- Returns current value.
- Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
- Returns:
- the current value
- Throws:
IOException - when an IO error occurs
InterruptedException - when interrupted
getCurrentKey
public org.apache.hadoop.io.NullWritable getCurrentKey()
throws IOException,
InterruptedException
- Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
- Throws:
IOException
InterruptedException
getProgress
public float getProgress()
throws IOException,
InterruptedException
- Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
- Throws:
IOException
InterruptedException
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit isplit,
org.apache.hadoop.mapreduce.TaskAttemptContext tc)
throws IOException,
InterruptedException
- Specified by:
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
- Throws:
IOException
InterruptedException
nextKeyValue
public boolean nextKeyValue()
throws IOException,
InterruptedException
- Specified by:
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.avro.generic.GenericData.Record>
- Throws:
IOException
InterruptedException
Copyright © 2007-2012 The Apache Software Foundation