|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Public @InterfaceStability.Stable public interface RecordReader<K,V>
RecordReader
reads <key, value> pairs from an
InputSplit
.
RecordReader
, typically, converts the byte-oriented view of
the input, provided by the InputSplit
, and presents a
record-oriented view for the Mapper
& Reducer
tasks for
processing. It thus assumes the responsibility of processing record
boundaries and presenting the tasks with keys and values.
InputSplit
,
InputFormat
Method Summary | |
---|---|
void |
close()
Close this InputSplit to future operations. |
K |
createKey()
Create an object of the appropriate type to be used as a key. |
V |
createValue()
Create an object of the appropriate type to be used as a value. |
long |
getPos()
Returns the current position in the input. |
float |
getProgress()
How much of the input has the RecordReader consumed i.e. |
boolean |
next(K key,
V value)
Reads the next key/value pair from the input for processing. |
Method Detail |
---|
boolean next(K key, V value) throws IOException
key
- the key to read data intovalue
- the value to read data into
IOException
K createKey()
V createValue()
long getPos() throws IOException
IOException
void close() throws IOException
InputSplit
to future operations.
IOException
float getProgress() throws IOException
RecordReader
consumed i.e.
has been processed by?
0.0
to 1.0
.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |