@InterfaceAudience.Private @InterfaceStability.Unstable 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 IOException, InterruptedException
split
- TaggegInputSplit objectcontext
- TaskAttemptContext objectIOException
InterruptedException
public void close() throws IOException
RecordReader
close
in interface Closeable
close
in interface AutoCloseable
close
in class RecordReader<K,V>
IOException
public K getCurrentKey() throws IOException, InterruptedException
RecordReader
getCurrentKey
in class RecordReader<K,V>
IOException
InterruptedException
public V getCurrentValue() throws IOException, InterruptedException
RecordReader
getCurrentValue
in class RecordReader<K,V>
IOException
InterruptedException
public float getProgress() throws IOException, InterruptedException
RecordReader
getProgress
in class RecordReader<K,V>
IOException
InterruptedException
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
RecordReader
initialize
in class RecordReader<K,V>
split
- the split that defines the range of records to readcontext
- the information about the taskIOException
InterruptedException
public boolean nextKeyValue() throws IOException, InterruptedException
RecordReader
nextKeyValue
in class RecordReader<K,V>
IOException
InterruptedException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.