org.apache.hadoop.streaming
Class StreamLineRecordReader
java.lang.Object
org.apache.hadoop.streaming.StreamBaseRecordReader
org.apache.hadoop.streaming.StreamLineRecordReader
- All Implemented Interfaces:
- RecordReader
public class StreamLineRecordReader
- extends StreamBaseRecordReader
Similar to org.apache.hadoop.mapred.TextRecordReader,
but delimits key and value with a TAB.
- Author:
- Michel Tourn
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamLineRecordReader
public StreamLineRecordReader(FSDataInputStream in,
FileSplit split,
Reporter reporter,
JobConf job,
FileSystem fs)
throws IOException
- Throws:
IOException
seekNextRecordBoundary
public void seekNextRecordBoundary()
throws IOException
- Description copied from class:
StreamBaseRecordReader
- Implementation should seek forward in_ to the first byte of the next record.
The initial byte offset in the stream is arbitrary.
- Specified by:
seekNextRecordBoundary
in class StreamBaseRecordReader
- Throws:
IOException
next
public boolean next(Writable key,
Writable value)
throws IOException
- Description copied from class:
StreamBaseRecordReader
- Read a record. Implementation should call numRecStats at the end
- Specified by:
next
in interface RecordReader
- Specified by:
next
in class StreamBaseRecordReader
- Parameters:
key
- the key to read data intovalue
- the value to read data into
- Returns:
- true iff a key/value was read, false if at EOF
- Throws:
IOException
- See Also:
Writable.readFields(DataInput)
Copyright © 2006 The Apache Software Foundation