@InterfaceAudience.Private @InterfaceStability.Unstable public class DelegatingRecordReader<K,V> extends RecordReader<K,V>
TaggedInputSplit| 构造器和说明 |
|---|
DelegatingRecordReader(InputSplit split,
TaskAttemptContext context)
Constructs the DelegatingRecordReader.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close the record reader.
|
K |
getCurrentKey()
Get the current key
|
V |
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 the next key, value pair.
|
public DelegatingRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
split - TaggegInputSplit objectcontext - TaskAttemptContext objectIOExceptionInterruptedExceptionpublic void close()
throws IOException
RecordReaderclose 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 RecordReader<K,V>IOExceptionpublic K getCurrentKey() throws IOException, InterruptedException
RecordReadergetCurrentKey 在类中 RecordReader<K,V>IOExceptionInterruptedExceptionpublic V getCurrentValue() throws IOException, InterruptedException
RecordReadergetCurrentValue 在类中 RecordReader<K,V>IOExceptionInterruptedExceptionpublic float getProgress()
throws IOException,
InterruptedException
RecordReadergetProgress 在类中 RecordReader<K,V>IOExceptionInterruptedExceptionpublic 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>IOExceptionInterruptedExceptionCopyright © 2009 The Apache Software Foundation