org.apache.hadoop.hive.ql.io
Class BucketizedHiveRecordReader<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>

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

public class BucketizedHiveRecordReader<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
extends HiveContextAwareRecordReader<K,V>

BucketizedHiveRecordReader is a wrapper on a list of RecordReader. It behaves similar as HiveRecordReader while it wraps a list of RecordReader from one file.


Field Summary
protected  int idx
           
protected  org.apache.hadoop.mapred.InputFormat inputFormat
           
protected  long progress
           
protected  org.apache.hadoop.mapred.Reporter reporter
           
protected  BucketizedHiveInputSplit split
           
 
Fields inherited from class org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader
isSorted, jobConf, recordReader
 
Constructor Summary
BucketizedHiveRecordReader(org.apache.hadoop.mapred.InputFormat inputFormat, BucketizedHiveInputSplit bucketizedSplit, org.apache.hadoop.mapred.JobConf jobConf, org.apache.hadoop.mapred.Reporter reporter)
           
 
Method Summary
 K createKey()
           
 V createValue()
           
 void doClose()
          Close this InputSplit to future operations.
 boolean doNext(K key, V value)
           
 long getPos()
           
 float getProgress()
           
protected  boolean initNextRecordReader()
          Get the record reader for the next chunk in this BucketizedHiveRecordReader.
 
Methods inherited from class org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader
close, foundAllTargets, getIOContext, initIOContext, initIOContext, initIOContext, initIOContextSortedProps, next, setRecordReader, updateIOContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

split

protected final BucketizedHiveInputSplit split

inputFormat

protected final org.apache.hadoop.mapred.InputFormat inputFormat

reporter

protected final org.apache.hadoop.mapred.Reporter reporter

progress

protected long progress

idx

protected int idx
Constructor Detail

BucketizedHiveRecordReader

public BucketizedHiveRecordReader(org.apache.hadoop.mapred.InputFormat inputFormat,
                                  BucketizedHiveInputSplit bucketizedSplit,
                                  org.apache.hadoop.mapred.JobConf jobConf,
                                  org.apache.hadoop.mapred.Reporter reporter)
                           throws IOException
Throws:
IOException
Method Detail

doClose

public void doClose()
             throws IOException
Description copied from class: HiveContextAwareRecordReader
Close this InputSplit to future operations.

Specified by:
doClose in class HiveContextAwareRecordReader<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
Throws:
IOException

createKey

public K createKey()

createValue

public V createValue()

getPos

public long getPos()
            throws IOException
Throws:
IOException

getProgress

public float getProgress()
                  throws IOException
Specified by:
getProgress in interface org.apache.hadoop.mapred.RecordReader<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
Overrides:
getProgress in class HiveContextAwareRecordReader<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
Throws:
IOException

doNext

public boolean doNext(K key,
                      V value)
               throws IOException
Overrides:
doNext in class HiveContextAwareRecordReader<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
Throws:
IOException

initNextRecordReader

protected boolean initNextRecordReader()
                                throws IOException
Get the record reader for the next chunk in this BucketizedHiveRecordReader.

Throws:
IOException


Copyright © 2011 The Apache Software Foundation