Package ml.shifu.guagua.mapreduce
Class GuaguaLineRecordReader
- java.lang.Object
-
- ml.shifu.guagua.mapreduce.GuaguaLineRecordReader
-
- All Implemented Interfaces:
ml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
@Deprecated public class GuaguaLineRecordReader extends Object implements ml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
Deprecated.A reader reads HDFS file line by line.Copy some code from
LineRecordReaderbut to supportGuaguaRecordReaderinterface.If use default constructor, user should also call
initialize(GuaguaFileSplit)like in below:this.setRecordReader(new GuaguaLineRecordReader()); this.getRecordReader().initialize(fileSplit);
or directly use other constructors:this.setRecordReader(new GuaguaLineRecordReader(fileSplit));
-
-
Constructor Summary
Constructors Constructor Description GuaguaLineRecordReader()Deprecated.GuaguaLineRecordReader(ml.shifu.guagua.io.GuaguaFileSplit split)Deprecated.GuaguaLineRecordReader(org.apache.hadoop.conf.Configuration conf, ml.shifu.guagua.io.GuaguaFileSplit split)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>getCurrentKey()Deprecated.GuaguaWritableAdapter<org.apache.hadoop.io.Text>getCurrentValue()Deprecated.floatgetProgress()Deprecated.Get the progress within the splitvoidinitialize(ml.shifu.guagua.io.GuaguaFileSplit split)Deprecated.booleannextKeyValue()Deprecated.
-
-
-
Constructor Detail
-
GuaguaLineRecordReader
public GuaguaLineRecordReader()
Deprecated.
-
GuaguaLineRecordReader
public GuaguaLineRecordReader(ml.shifu.guagua.io.GuaguaFileSplit split) throws IOExceptionDeprecated.- Throws:
IOException
-
GuaguaLineRecordReader
public GuaguaLineRecordReader(org.apache.hadoop.conf.Configuration conf, ml.shifu.guagua.io.GuaguaFileSplit split) throws IOExceptionDeprecated.- Throws:
IOException
-
-
Method Detail
-
initialize
public void initialize(ml.shifu.guagua.io.GuaguaFileSplit split) throws IOExceptionDeprecated.- Specified by:
initializein interfaceml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>- Throws:
IOException
-
nextKeyValue
public boolean nextKeyValue() throws IOExceptionDeprecated.- Specified by:
nextKeyValuein interfaceml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>- Throws:
IOException
-
getCurrentKey
public GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable> getCurrentKey()
Deprecated.- Specified by:
getCurrentKeyin interfaceml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
-
getCurrentValue
public GuaguaWritableAdapter<org.apache.hadoop.io.Text> getCurrentValue()
Deprecated.- Specified by:
getCurrentValuein interfaceml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
-
getProgress
public float getProgress()
Deprecated.Get the progress within the split
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>- Throws:
IOException
-
-