public class GuaguaSequenceAsTextRecordReader extends Object implements GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.Text>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
BytesWritable.
Copy some code from org.apache.hadoop.mapred.GuaguaSequenceAsTextRecordReader but to support
GuaguaRecordReader interface.
If use default constructor, user should also call initialize(GuaguaFileSplit) like in below:
this.setRecordReader(new GuaguaSequenceAsBinaryRecordReader()); this.getRecordReader().initialize(fileSplit);or directly use other constructors:
this.setRecordReader(new GuaguaSequenceAsTextRecordReader(fileSplit));
| Constructor and Description |
|---|
GuaguaSequenceAsTextRecordReader() |
GuaguaSequenceAsTextRecordReader(org.apache.hadoop.conf.Configuration conf,
GuaguaFileSplit split) |
GuaguaSequenceAsTextRecordReader(GuaguaFileSplit split) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
GuaguaWritableAdapter<org.apache.hadoop.io.Text> |
getCurrentKey() |
GuaguaWritableAdapter<org.apache.hadoop.io.Text> |
getCurrentValue() |
float |
getProgress()
Return the progress within the input split
|
void |
initialize(GuaguaFileSplit split) |
boolean |
nextKeyValue() |
public GuaguaSequenceAsTextRecordReader()
public GuaguaSequenceAsTextRecordReader(GuaguaFileSplit split) throws IOException
IOExceptionpublic GuaguaSequenceAsTextRecordReader(org.apache.hadoop.conf.Configuration conf,
GuaguaFileSplit split)
throws IOException
IOExceptionpublic float getProgress()
throws IOException
IOExceptionpublic void initialize(GuaguaFileSplit split) throws IOException
initialize in interface GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.Text>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>IOExceptionpublic boolean nextKeyValue()
throws IOException
nextKeyValue in interface GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.Text>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>IOExceptionpublic GuaguaWritableAdapter<org.apache.hadoop.io.Text> getCurrentKey()
getCurrentKey in interface GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.Text>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>public GuaguaWritableAdapter<org.apache.hadoop.io.Text> getCurrentValue()
getCurrentValue in interface GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.Text>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>public void close()
throws IOException
close in interface GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.Text>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>IOExceptionCopyright © 2015. All Rights Reserved.