public static class SequenceFileAsBinaryInputFormat.SequenceFileAsBinaryRecordReader extends RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>
| Constructor and Description |
|---|
SequenceFileAsBinaryInputFormat.SequenceFileAsBinaryRecordReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the record reader.
|
org.apache.hadoop.io.BytesWritable |
getCurrentKey()
Get the current key
|
org.apache.hadoop.io.BytesWritable |
getCurrentValue()
Get the current value.
|
java.lang.String |
getKeyClassName()
Retrieve the name of the key class for this SequenceFile.
|
float |
getProgress()
Return the progress within the input split
|
java.lang.String |
getValueClassName()
Retrieve the name of the value class for this SequenceFile.
|
void |
initialize(InputSplit split,
TaskAttemptContext context)
Called once at initialization.
|
boolean |
nextKeyValue()
Read raw bytes from a SequenceFile.
|
public SequenceFileAsBinaryInputFormat.SequenceFileAsBinaryRecordReader()
public void initialize(InputSplit split, TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
RecordReaderinitialize in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>split - the split that defines the range of records to readcontext - the information about the taskjava.io.IOExceptionjava.lang.InterruptedExceptionpublic org.apache.hadoop.io.BytesWritable getCurrentKey()
throws java.io.IOException,
java.lang.InterruptedException
RecordReadergetCurrentKey in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>java.io.IOExceptionjava.lang.InterruptedExceptionpublic org.apache.hadoop.io.BytesWritable getCurrentValue()
throws java.io.IOException,
java.lang.InterruptedException
RecordReadergetCurrentValue in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>java.io.IOExceptionjava.lang.InterruptedExceptionpublic java.lang.String getKeyClassName()
SequenceFile.Reader.getKeyClassName()public java.lang.String getValueClassName()
SequenceFile.Reader.getValueClassName()public boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
nextKeyValue in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>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.BytesWritable,org.apache.hadoop.io.BytesWritable>java.io.IOExceptionpublic float getProgress()
throws java.io.IOException,
java.lang.InterruptedException
getProgress in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>java.io.IOExceptionjava.lang.InterruptedExceptionCopyright © 2009 The Apache Software Foundation