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.IOException
java.lang.InterruptedException
public void close() throws java.io.IOException
RecordReader
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class RecordReader<K,V>
java.io.IOException
public K getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
RecordReader
getCurrentKey
in class RecordReader<K,V>
java.io.IOException
java.lang.InterruptedException
public V getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
RecordReader
getCurrentValue
in class RecordReader<K,V>
java.io.IOException
java.lang.InterruptedException
public float getProgress() throws java.io.IOException, java.lang.InterruptedException
RecordReader
getProgress
in class RecordReader<K,V>
java.io.IOException
java.lang.InterruptedException
public void initialize(InputSplit split, TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
RecordReader
initialize
in class RecordReader<K,V>
split
- the split that defines the range of records to readcontext
- the information about the taskjava.io.IOException
java.lang.InterruptedException
public boolean nextKeyValue() throws java.io.IOException, java.lang.InterruptedException
RecordReader
nextKeyValue
in class RecordReader<K,V>
java.io.IOException
java.lang.InterruptedException
Copyright © 2009 The Apache Software Foundation