org.apache.hadoop.streaming
Class StreamSequenceRecordReader
java.lang.Object
org.apache.hadoop.streaming.StreamBaseRecordReader
org.apache.hadoop.streaming.StreamSequenceRecordReader
- All Implemented Interfaces:
- RecordReader
public class StreamSequenceRecordReader
- extends StreamBaseRecordReader
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamSequenceRecordReader
public StreamSequenceRecordReader(FSDataInputStream in,
FileSplit split,
Reporter reporter,
JobConf job,
FileSystem fs)
throws IOException
- 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)
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
createKey
public WritableComparable createKey()
- Description copied from interface:
RecordReader
- Create an object of the appropriate type to be used as a key.
- Specified by:
createKey
in interface RecordReader
- Overrides:
createKey
in class StreamBaseRecordReader
- Returns:
- a new key object
createValue
public Writable createValue()
- Description copied from interface:
RecordReader
- Create an object of the appropriate type to be used as the value.
- Specified by:
createValue
in interface RecordReader
- Overrides:
createValue
in class StreamBaseRecordReader
- Returns:
- a new value object
Copyright © 2006 The Apache Software Foundation