public class SequenceFileRecordReader<K,V> extends RecordReader<K,V>
RecordReader for SequenceFiles.| 限定符和类型 | 字段和说明 |
|---|---|
protected Configuration |
conf |
| 构造器和说明 |
|---|
SequenceFileRecordReader() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close the record reader.
|
K |
getCurrentKey()
Get the current key
|
V |
getCurrentValue()
Get the current value.
|
float |
getProgress()
Return the progress within the input split
|
void |
initialize(InputSplit split,
TaskAttemptContext context)
Called once at initialization.
|
boolean |
nextKeyValue()
Read the next key, value pair.
|
protected Configuration conf
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
RecordReaderinitialize 在类中 RecordReader<K,V>split - the split that defines the range of records to readcontext - the information about the taskIOExceptionInterruptedExceptionpublic boolean nextKeyValue()
throws IOException,
InterruptedException
RecordReadernextKeyValue 在类中 RecordReader<K,V>IOExceptionInterruptedExceptionpublic K getCurrentKey()
RecordReadergetCurrentKey 在类中 RecordReader<K,V>public V getCurrentValue()
RecordReadergetCurrentValue 在类中 RecordReader<K,V>public float getProgress()
throws IOException
getProgress 在类中 RecordReader<K,V>IOExceptionpublic void close()
throws IOException
RecordReaderclose 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 RecordReader<K,V>IOExceptionCopyright © 2009 The Apache Software Foundation