KEYIN - VALUEIN - @InterfaceAudience.Public @InterfaceStability.Stable public abstract class RecordReader<KEYIN,VALUEIN> extends Object implements Closeable
Mapper.| Constructor and Description |
|---|
RecordReader() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Close the record reader.
|
abstract KEYIN |
getCurrentKey()
Get the current key
|
abstract VALUEIN |
getCurrentValue()
Get the current value.
|
abstract float |
getProgress()
The current progress of the record reader through its data.
|
abstract void |
initialize(InputSplit split,
TaskAttemptContext context)
Called once at initialization.
|
abstract boolean |
nextKeyValue()
Read the next key, value pair.
|
public abstract void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
split - the split that defines the range of records to readcontext - the information about the taskIOExceptionInterruptedExceptionpublic abstract boolean nextKeyValue()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic abstract KEYIN getCurrentKey() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic abstract VALUEIN getCurrentValue() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic abstract float getProgress()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic abstract void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.