Package org.apache.hadoop.mapred
Class SequenceFileAsTextRecordReader
java.lang.Object
org.apache.hadoop.mapred.SequenceFileAsTextRecordReader
- All Implemented Interfaces:
Closeable,AutoCloseable,RecordReader<Text,Text>
@Public
@Stable
public class SequenceFileAsTextRecordReader
extends Object
implements RecordReader<Text,Text>
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close thisInputSplitto future operations.Create an object of the appropriate type to be used as a key.Create an object of the appropriate type to be used as a value.longgetPos()Returns the current position in the input.floatHow much of the input has theRecordReaderconsumed i.e.booleanRead key/value pair in a line.
-
Constructor Details
-
SequenceFileAsTextRecordReader
- Throws:
IOException
-
-
Method Details
-
createKey
Description copied from interface:RecordReaderCreate an object of the appropriate type to be used as a key.- Specified by:
createKeyin interfaceRecordReader<Text,Text> - Returns:
- a new key object.
-
createValue
Description copied from interface:RecordReaderCreate an object of the appropriate type to be used as a value.- Specified by:
createValuein interfaceRecordReader<Text,Text> - Returns:
- a new value object.
-
next
Read key/value pair in a line.- Specified by:
nextin interfaceRecordReader<Text,Text> - 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
-
getProgress
Description copied from interface:RecordReaderHow much of the input has theRecordReaderconsumed i.e. has been processed by?- Specified by:
getProgressin interfaceRecordReader<Text,Text> - Returns:
- progress from
0.0to1.0. - Throws:
IOException
-
getPos
Description copied from interface:RecordReaderReturns the current position in the input.- Specified by:
getPosin interfaceRecordReader<Text,Text> - Returns:
- the current position in the input.
- Throws:
IOException
-
close
Description copied from interface:RecordReaderClose thisInputSplitto future operations.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceRecordReader<Text,Text> - Throws:
IOException
-