KEY - key type for each recordVALUE - value type for each recordpublic interface GuaguaRecordReader<KEY extends Bytable,VALUE extends Bytable>
GuaguaRecordReader is used for consistent interface to iterate data through FileSplit provided. The typical
implementation is HDFS implementation in guagua-mapreduce.
To use it, one should set implementation in AbstractWorkerComputable.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close resources at last, for example file descriptors.
|
KEY |
getCurrentKey()
Tmp we only support LongWritable key for byte offset in each line, follow LineRecordReader in hadoop.
|
VALUE |
getCurrentValue()
Tmp we only support Text value for whole content in each line, follow LineRecordReader in hadoop.
|
void |
initialize(GuaguaFileSplit split)
Initialize file split for user to create relative reader instance.
|
boolean |
nextKeyValue()
Cursor shift to next and set current key value.
|
void initialize(GuaguaFileSplit split) throws IOException
IOExceptionboolean nextKeyValue()
throws IOException
IOExceptionKEY getCurrentKey()
VALUE getCurrentValue()
void close()
throws IOException
IOExceptionCopyright © 2015. All Rights Reserved.