Package ml.shifu.guagua.mapreduce
Class GuaguaSequenceRecordReader<KEY extends org.apache.hadoop.io.Writable,VALUE extends org.apache.hadoop.io.Writable>
- java.lang.Object
-
- ml.shifu.guagua.mapreduce.GuaguaSequenceRecordReader<KEY,VALUE>
-
- All Implemented Interfaces:
ml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<KEY>,GuaguaWritableAdapter<VALUE>>
- Direct Known Subclasses:
GuaguaSequenceAsBinaryRecordReader,GuaguaSequenceAsTextRecordReader
@Deprecated public class GuaguaSequenceRecordReader<KEY extends org.apache.hadoop.io.Writable,VALUE extends org.apache.hadoop.io.Writable> extends Object implements ml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<KEY>,GuaguaWritableAdapter<VALUE>>
Deprecated.A reader read HDFS sequence file key by key. The sequence key and value types are bothBytesWritable.Copy some code from
SequenceFileRecordReaderbut to supportGuaguaRecordReaderinterface.If use default constructor, user should also call
initialize(GuaguaFileSplit)like in below:this.setRecordReader(new SequenceFileRecordReader(Text.class, Text,class)); this.getRecordReader().initialize(fileSplit);
or directly use other constructors:this.setRecordReader(new SequenceFileRecordReader(fileSplit, Text.class, Text,class));
-
-
Constructor Summary
Constructors Constructor Description GuaguaSequenceRecordReader(Class<? extends org.apache.hadoop.io.Writable> keyClass, Class<? extends org.apache.hadoop.io.Writable> valueClass)Deprecated.GuaguaSequenceRecordReader(ml.shifu.guagua.io.GuaguaFileSplit split, Class<? extends org.apache.hadoop.io.Writable> keyClass, Class<? extends org.apache.hadoop.io.Writable> valueClass)Deprecated.GuaguaSequenceRecordReader(org.apache.hadoop.conf.Configuration conf, ml.shifu.guagua.io.GuaguaFileSplit split, Class<? extends org.apache.hadoop.io.Writable> keyClass, Class<? extends org.apache.hadoop.io.Writable> valueClass)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.GuaguaWritableAdapter<KEY>getCurrentKey()Deprecated.GuaguaWritableAdapter<VALUE>getCurrentValue()Deprecated.floatgetProgress()Deprecated.Return the progress within the input splitvoidinitialize(ml.shifu.guagua.io.GuaguaFileSplit split)Deprecated.booleannextKeyValue()Deprecated.
-
-
-
Constructor Detail
-
GuaguaSequenceRecordReader
public GuaguaSequenceRecordReader(Class<? extends org.apache.hadoop.io.Writable> keyClass, Class<? extends org.apache.hadoop.io.Writable> valueClass) throws IOException
Deprecated.- Throws:
IOException
-
GuaguaSequenceRecordReader
public GuaguaSequenceRecordReader(ml.shifu.guagua.io.GuaguaFileSplit split, Class<? extends org.apache.hadoop.io.Writable> keyClass, Class<? extends org.apache.hadoop.io.Writable> valueClass) throws IOExceptionDeprecated.- Throws:
IOException
-
GuaguaSequenceRecordReader
public GuaguaSequenceRecordReader(org.apache.hadoop.conf.Configuration conf, ml.shifu.guagua.io.GuaguaFileSplit split, Class<? extends org.apache.hadoop.io.Writable> keyClass, Class<? extends org.apache.hadoop.io.Writable> valueClass) throws IOExceptionDeprecated.- Throws:
IOException
-
-
Method Detail
-
getProgress
public float getProgress() throws IOExceptionDeprecated.Return the progress within the input split- Returns:
- 0.0 to 1.0 of the input byte range
- Throws:
IOException
-
initialize
public void initialize(ml.shifu.guagua.io.GuaguaFileSplit split) throws IOExceptionDeprecated.- Specified by:
initializein interfaceml.shifu.guagua.io.GuaguaRecordReader<KEY extends org.apache.hadoop.io.Writable,VALUE extends org.apache.hadoop.io.Writable>- Throws:
IOException
-
nextKeyValue
public boolean nextKeyValue() throws IOExceptionDeprecated.- Specified by:
nextKeyValuein interfaceml.shifu.guagua.io.GuaguaRecordReader<KEY extends org.apache.hadoop.io.Writable,VALUE extends org.apache.hadoop.io.Writable>- Throws:
IOException
-
getCurrentKey
public GuaguaWritableAdapter<KEY> getCurrentKey()
Deprecated.
-
getCurrentValue
public GuaguaWritableAdapter<VALUE> getCurrentValue()
Deprecated.
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceml.shifu.guagua.io.GuaguaRecordReader<KEY extends org.apache.hadoop.io.Writable,VALUE extends org.apache.hadoop.io.Writable>- Throws:
IOException
-
-