org.apache.pig.impl.io
Class PigLineRecordReader.LineReader

java.lang.Object
  extended by org.apache.pig.impl.io.PigLineRecordReader.Reader
      extended by org.apache.pig.impl.io.PigLineRecordReader.LineReader
Enclosing class:
PigLineRecordReader

public static class PigLineRecordReader.LineReader
extends PigLineRecordReader.Reader

This is a simple implementation of LineReader without buffering


Field Summary
protected  long end
          Ending offset until which the buffer can be read.
protected  int maxLineLength
          Maximum line length expected in the input file
protected  long start
          Starting offset of the buffer to be read
 
Fields inherited from class org.apache.pig.impl.io.PigLineRecordReader.Reader
os, OS_UNIX, OS_WINDOWS
 
Method Summary
 boolean getNext(org.apache.hadoop.io.Text value)
          Provides next line read from InputStream
 long getPosition()
          Returns the position of current Buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

protected long start
Starting offset of the buffer to be read


end

protected long end
Ending offset until which the buffer can be read. This is a soft boundary.


maxLineLength

protected int maxLineLength
Maximum line length expected in the input file

Method Detail

getNext

public boolean getNext(org.apache.hadoop.io.Text value)
                throws IOException
Description copied from class: PigLineRecordReader.Reader
Provides next line read from InputStream

Specified by:
getNext in class PigLineRecordReader.Reader
Parameters:
value - Text the the line is supposed to be returned in
Returns:
true if more data is available, else false
Throws:
IOException

getPosition

public long getPosition()
                 throws IOException
Description copied from class: PigLineRecordReader.Reader
Returns the position of current Buffer

Specified by:
getPosition in class PigLineRecordReader.Reader
Returns:
long value of position of current stream
Throws:
IOException


Copyright © ${year} The Apache Software Foundation