org.apache.hadoop.hive.ql.io
Class HiveContextAwareRecordReader<K,V>

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader<K,V>
All Implemented Interfaces:
org.apache.hadoop.mapred.RecordReader<K,V>
Direct Known Subclasses:
BucketizedHiveRecordReader, CombineHiveRecordReader, HiveRecordReader

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


Constructor Summary
HiveContextAwareRecordReader()
           
 
Method Summary
 void close()
           
abstract  void doClose()
          Close this InputSplit to future operations.
abstract  boolean doNext(K key, V value)
          Reads the next key/value pair from the input for processing.
 IOContext getIOContext()
           
 void initIOContext(org.apache.hadoop.mapred.FileSplit split, org.apache.hadoop.mapred.JobConf job, Class inputFormatClass)
           
 void initIOContext(org.apache.hadoop.mapred.FileSplit split, org.apache.hadoop.mapred.JobConf job, Class inputFormatClass, org.apache.hadoop.mapred.RecordReader recordReader)
           
 void initIOContext(long startPos, boolean isBlockPointer, String inputFile)
           
 boolean next(K key, V value)
           
protected  void updateIOContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.RecordReader
createKey, createValue, getPos, getProgress
 

Constructor Detail

HiveContextAwareRecordReader

public HiveContextAwareRecordReader()
Method Detail

doNext

public abstract boolean doNext(K key,
                               V value)
                        throws IOException
Reads the next key/value pair from the input for processing.

Parameters:
key - the key to read data into
value - the value to read data into
Returns:
true if a key/value was read, false if at EOF
Throws:
IOException

doClose

public abstract void doClose()
                      throws IOException
Close this InputSplit to future operations.

Throws:
IOException

close

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

next

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

updateIOContext

protected void updateIOContext()
                        throws IOException
Throws:
IOException

getIOContext

public IOContext getIOContext()

initIOContext

public void initIOContext(long startPos,
                          boolean isBlockPointer,
                          String inputFile)

initIOContext

public void initIOContext(org.apache.hadoop.mapred.FileSplit split,
                          org.apache.hadoop.mapred.JobConf job,
                          Class inputFormatClass)
                   throws IOException
Throws:
IOException

initIOContext

public void initIOContext(org.apache.hadoop.mapred.FileSplit split,
                          org.apache.hadoop.mapred.JobConf job,
                          Class inputFormatClass,
                          org.apache.hadoop.mapred.RecordReader recordReader)
                   throws IOException
Throws:
IOException


Copyright © 2011 The Apache Software Foundation