public class DelegatingRecordReader<K,V> extends RecordReader<K,V>
TaggedInputSplit| Constructor and Description |
|---|
DelegatingRecordReader(InputSplit split,
TaskAttemptContext context)
Constructs the DelegatingRecordReader.
|
| Modifier and Type | Method and Description |
|---|---|
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 java.io.IOException, java.lang.InterruptedException
split - TaggegInputSplit objectcontext - TaskAttemptContext objectjava.io.IOExceptionjava.lang.InterruptedExceptionpublic void close()
throws java.io.IOException
RecordReaderclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class RecordReader<K,V>java.io.IOExceptionpublic K getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
RecordReadergetCurrentKey in class RecordReader<K,V>java.io.IOExceptionjava.lang.InterruptedExceptionpublic V getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
RecordReadergetCurrentValue in class RecordReader<K,V>java.io.IOExceptionjava.lang.InterruptedExceptionpublic float getProgress()
throws java.io.IOException,
java.lang.InterruptedException
RecordReadergetProgress in class RecordReader<K,V>java.io.IOExceptionjava.lang.InterruptedExceptionpublic void initialize(InputSplit split, TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
RecordReaderinitialize in class RecordReader<K,V>split - the split that defines the range of records to readcontext - the information about the taskjava.io.IOExceptionjava.lang.InterruptedExceptionpublic boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
RecordReadernextKeyValue in class RecordReader<K,V>java.io.IOExceptionjava.lang.InterruptedExceptionCopyright © 2009 The Apache Software Foundation