org.apache.hadoop.mapred
Class SequenceFileAsTextRecordReader
java.lang.Object
org.apache.hadoop.mapred.SequenceFileRecordReader
org.apache.hadoop.mapred.SequenceFileAsTextRecordReader
- All Implemented Interfaces:
- RecordReader
public class SequenceFileAsTextRecordReader
- extends SequenceFileRecordReader
This class converts the input keys and values to their String forms by calling toString()
method. This class to SequenceFileAsTextInputFormat class is as LineRecordReader
class to TextInputFormat class.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceFileAsTextRecordReader
public SequenceFileAsTextRecordReader(Configuration conf,
FileSplit split)
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 SequenceFileRecordReader
- 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 SequenceFileRecordReader
- Returns:
- a new value object
next
public boolean next(Writable key,
Writable value)
throws IOException
- Read key/value pair in a line.
- Specified by:
next
in interface RecordReader
- Overrides:
next
in class SequenceFileRecordReader
- 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