org.apache.pig.impl.io
Class PigLineRecordReader

java.lang.Object
  extended by org.apache.pig.impl.io.PigLineRecordReader

public class PigLineRecordReader
extends Object

This class is for Reading data line by Line in Pig It uses org.apache.hadoop.mapred.LineRecordReader for reading simple Text For BZip it uses a different class which does not do buffering.


Nested Class Summary
static class PigLineRecordReader.BufferingLineReader
          A buffering LineReader.
static class PigLineRecordReader.LineReader
          This is a simple implementation of LineReader without buffering
static class PigLineRecordReader.Reader
          Abstract class that is used to handle reading of values
 
Field Summary
protected  PigLineRecordReader.Reader lineReader
           
 
Constructor Summary
PigLineRecordReader(BufferedPositionedInputStream in, long offset, long end)
           
 
Method Summary
 long getPosition()
          Wrapper around the LineReader to provide position
 boolean next(org.apache.hadoop.io.Text value)
          Wrapper around the original LineReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineReader

protected PigLineRecordReader.Reader lineReader
Constructor Detail

PigLineRecordReader

public PigLineRecordReader(BufferedPositionedInputStream in,
                           long offset,
                           long end)
Method Detail

next

public boolean next(org.apache.hadoop.io.Text value)
             throws IOException
Wrapper around the original LineReader

Parameters:
value - Text into which line value is written
Returns:
true if more data is available, else false
Throws:
IOException

getPosition

public long getPosition()
                 throws IOException
Wrapper around the LineReader to provide position

Throws:
IOException


Copyright © ${year} The Apache Software Foundation