org.apache.pig.impl.io
Class BinStorageRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,Tuple>
      extended by org.apache.pig.impl.io.BinStorageRecordReader
All Implemented Interfaces:
Closeable

public class BinStorageRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,Tuple>

Treats keys as offset in file and value as line.


Field Summary
static int RECORD_1
           
static int RECORD_2
           
static int RECORD_3
           
 
Constructor Summary
BinStorageRecordReader()
           
 
Method Summary
 void close()
           
 org.apache.hadoop.io.Text getCurrentKey()
           
 Tuple getCurrentValue()
           
 float getProgress()
          Get the progress within the split
 void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit, 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
 

Field Detail

RECORD_1

public static final int RECORD_1
See Also:
Constant Field Values

RECORD_2

public static final int RECORD_2
See Also:
Constant Field Values

RECORD_3

public static final int RECORD_3
See Also:
Constant Field Values
Constructor Detail

BinStorageRecordReader

public BinStorageRecordReader()
Method Detail

initialize

public void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
                       org.apache.hadoop.mapreduce.TaskAttemptContext context)
                throws IOException
Specified by:
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,Tuple>
Throws:
IOException

nextKeyValue

public boolean nextKeyValue()
                     throws IOException
Specified by:
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,Tuple>
Throws:
IOException

getCurrentKey

public org.apache.hadoop.io.Text getCurrentKey()
Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,Tuple>

getCurrentValue

public Tuple getCurrentValue()
Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,Tuple>

getProgress

public float getProgress()
Get the progress within the split

Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,Tuple>

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.Text,Tuple>
Throws:
IOException


Copyright © 2007-2012 The Apache Software Foundation