KEYIN - VALUEIN - public abstract class RecordReader<KEYIN,VALUEIN>
extends java.lang.Object
implements java.io.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 java.io.IOException, java.lang.InterruptedException
split - the split that defines the range of records to readcontext - the information about the taskjava.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract KEYIN getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract VALUEIN getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract float getProgress()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright © 2009 The Apache Software Foundation