org.apache.avro.mapreduce
Class AvroSequenceFileInputFormat.AvroSequenceFileRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<K,V>
      extended by org.apache.avro.mapreduce.AvroSequenceFileInputFormat.AvroSequenceFileRecordReader
All Implemented Interfaces:
Closeable
Enclosing class:
AvroSequenceFileInputFormat<K,V>

protected class AvroSequenceFileInputFormat.AvroSequenceFileRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<K,V>

Reads records from a SequenceFile that supports Avro data.

This class is based on Hadoop's SequenceFileRecordReader, modified to construct an AvroSequenceFile.Reader instead of a SequenceFile.Reader.


Constructor Summary
protected AvroSequenceFileInputFormat.AvroSequenceFileRecordReader()
           
 
Method Summary
 void close()
          
 K getCurrentKey()
          
 V getCurrentValue()
          
 float getProgress()
          
 void initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
          
 boolean nextKeyValue()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroSequenceFileInputFormat.AvroSequenceFileRecordReader

protected AvroSequenceFileInputFormat.AvroSequenceFileRecordReader()
Method Detail

initialize

public void initialize(org.apache.hadoop.mapreduce.InputSplit split,
                       org.apache.hadoop.mapreduce.TaskAttemptContext context)
                throws IOException,
                       InterruptedException

Specified by:
initialize in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException

nextKeyValue

public boolean nextKeyValue()
                     throws IOException,
                            InterruptedException

Specified by:
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException

getCurrentKey

public K getCurrentKey()

Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<K,V>

getCurrentValue

public V getCurrentValue()

Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>

getProgress

public float getProgress()
                  throws IOException

Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException

close

public void close()
           throws IOException

Specified by:
close in interface Closeable
Specified by:
close in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.