public class SequenceFileAsTextRecordReader extends RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
| Constructor and Description |
|---|
SequenceFileAsTextRecordReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the record reader.
|
org.apache.hadoop.io.Text |
getCurrentKey()
Get the current key
|
org.apache.hadoop.io.Text |
getCurrentValue()
Get the current value.
|
float |
getProgress()
The current progress of the record reader through its data.
|
void |
initialize(InputSplit split,
TaskAttemptContext context)
Called once at initialization.
|
boolean |
nextKeyValue()
Read key/value pair in a line.
|
public SequenceFileAsTextRecordReader()
throws java.io.IOException
java.io.IOExceptionpublic void initialize(InputSplit split, TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
RecordReaderinitialize in class RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>split - the split that defines the range of records to readcontext - the information about the taskjava.io.IOExceptionjava.lang.InterruptedExceptionpublic org.apache.hadoop.io.Text getCurrentKey()
throws java.io.IOException,
java.lang.InterruptedException
RecordReadergetCurrentKey in class RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>java.io.IOExceptionjava.lang.InterruptedExceptionpublic org.apache.hadoop.io.Text getCurrentValue()
throws java.io.IOException,
java.lang.InterruptedException
RecordReadergetCurrentValue in class RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>java.io.IOExceptionjava.lang.InterruptedExceptionpublic boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
nextKeyValue in class RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>java.io.IOExceptionjava.lang.InterruptedExceptionpublic float getProgress()
throws java.io.IOException,
java.lang.InterruptedException
RecordReadergetProgress in class RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>java.io.IOExceptionjava.lang.InterruptedExceptionpublic void close()
throws java.io.IOException
RecordReaderclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>java.io.IOExceptionCopyright © 2009 The Apache Software Foundation