org.apache.hadoop.streaming
Class StreamLineRecordReader
java.lang.Object
org.apache.hadoop.mapred.LineRecordReader
org.apache.hadoop.streaming.StreamLineRecordReader
- All Implemented Interfaces:
- RecordReader
public class StreamLineRecordReader
- extends LineRecordReader
Similar to org.apache.hadoop.mapred.TextRecordReader,
but delimits key and value with a TAB.
- Author:
- Michel Tourn
Field Summary |
protected static org.apache.commons.logging.Log |
LOG
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.commons.logging.Log LOG
StreamLineRecordReader
public StreamLineRecordReader(FSDataInputStream in,
FileSplit split,
Reporter reporter,
JobConf job,
FileSystem fs)
throws IOException
- 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 LineRecordReader
- 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 LineRecordReader
- Returns:
- a new value object
next
public boolean next(Writable key,
Writable value)
throws IOException
- Description copied from class:
LineRecordReader
- Read a line.
- Specified by:
next
in interface RecordReader
- Overrides:
next
in class LineRecordReader
- 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