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.
|
String |
getKeyClassName()
Retrieve the name of the key class for this SequenceFile.
|
float |
getProgress()
Return the progress within the input split
|
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 IOException, 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 taskIOExceptionInterruptedExceptionpublic org.apache.hadoop.io.BytesWritable getCurrentKey()
throws IOException,
InterruptedException
RecordReadergetCurrentKey in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>IOExceptionInterruptedExceptionpublic org.apache.hadoop.io.BytesWritable getCurrentValue()
throws IOException,
InterruptedException
RecordReadergetCurrentValue in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>IOExceptionInterruptedExceptionpublic String getKeyClassName()
SequenceFile.Reader.getKeyClassName()public String getValueClassName()
SequenceFile.Reader.getValueClassName()public boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>IOExceptionInterruptedExceptionpublic void close()
throws IOException
RecordReaderclose in interface Closeableclose in interface AutoCloseableclose in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>IOExceptionpublic float getProgress()
throws IOException,
InterruptedException
getProgress in class RecordReader<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>IOExceptionInterruptedExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.