cascading.tap.hadoop.io
Class CombineFileRecordReaderWrapper<K,V>

java.lang.Object
  extended by cascading.tap.hadoop.io.CombineFileRecordReaderWrapper<K,V>
All Implemented Interfaces:
org.apache.hadoop.mapred.RecordReader<K,V>

public class CombineFileRecordReaderWrapper<K,V>
extends Object
implements org.apache.hadoop.mapred.RecordReader<K,V>

A wrapper class for a record reader that handles a single file split. It delegates most of the methods to the wrapped instance. We need this wrapper to satisfy the constructor requirement to be used with hadoop's CombineFileRecordReader class.

See Also:
CombineFileRecordReader, CombineFileInputFormat

Field Summary
static String INDIVIDUAL_INPUT_FORMAT
          property that indicates how individual input format is to be interpreted
 
Constructor Summary
CombineFileRecordReaderWrapper(org.apache.hadoop.mapred.lib.CombineFileSplit split, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.mapred.Reporter reporter, Integer idx)
           
 
Method Summary
 void close()
           
 K createKey()
           
 V createValue()
           
 long getPos()
           
 float getProgress()
           
 boolean next(K key, V value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDIVIDUAL_INPUT_FORMAT

public static final String INDIVIDUAL_INPUT_FORMAT
property that indicates how individual input format is to be interpreted

See Also:
Constant Field Values
Constructor Detail

CombineFileRecordReaderWrapper

public CombineFileRecordReaderWrapper(org.apache.hadoop.mapred.lib.CombineFileSplit split,
                                      org.apache.hadoop.conf.Configuration conf,
                                      org.apache.hadoop.mapred.Reporter reporter,
                                      Integer idx)
                               throws Exception
Throws:
Exception
Method Detail

next

public boolean next(K key,
                    V value)
             throws IOException
Specified by:
next in interface org.apache.hadoop.mapred.RecordReader<K,V>
Throws:
IOException

createKey

public K createKey()
Specified by:
createKey in interface org.apache.hadoop.mapred.RecordReader<K,V>

createValue

public V createValue()
Specified by:
createValue in interface org.apache.hadoop.mapred.RecordReader<K,V>

getPos

public long getPos()
            throws IOException
Specified by:
getPos in interface org.apache.hadoop.mapred.RecordReader<K,V>
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface org.apache.hadoop.mapred.RecordReader<K,V>
Throws:
IOException

getProgress

public float getProgress()
                  throws IOException
Specified by:
getProgress in interface org.apache.hadoop.mapred.RecordReader<K,V>
Throws:
IOException


Copyright © 2007-2013 Concurrent, Inc. All Rights Reserved.