ml.shifu.guagua.hadoop.io
类 GuaguaSequenceRecordReader<KEY extends org.apache.hadoop.io.Writable,VALUE extends org.apache.hadoop.io.Writable>
java.lang.Object
ml.shifu.guagua.hadoop.io.GuaguaSequenceRecordReader<KEY,VALUE>
- 所有已实现的接口:
- GuaguaRecordReader<GuaguaWritableAdapter<KEY>,GuaguaWritableAdapter<VALUE>>
public class GuaguaSequenceRecordReader<KEY extends org.apache.hadoop.io.Writable,VALUE extends org.apache.hadoop.io.Writable>
- extends Object
- implements GuaguaRecordReader<GuaguaWritableAdapter<KEY>,GuaguaWritableAdapter<VALUE>>
A reader read HDFS sequence file key by key. The sequence key and value types are both BytesWritable.
Copy some code from SequenceFileRecordReader but to support
GuaguaRecordReader interface.
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));
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GuaguaSequenceRecordReader
public GuaguaSequenceRecordReader(Class<? extends org.apache.hadoop.io.Writable> keyClass,
Class<? extends org.apache.hadoop.io.Writable> valueClass)
throws IOException
- 抛出:
IOException
GuaguaSequenceRecordReader
public GuaguaSequenceRecordReader(GuaguaFileSplit split,
Class<? extends org.apache.hadoop.io.Writable> keyClass,
Class<? extends org.apache.hadoop.io.Writable> valueClass)
throws IOException
- 抛出:
IOException
GuaguaSequenceRecordReader
public GuaguaSequenceRecordReader(org.apache.hadoop.conf.Configuration conf,
GuaguaFileSplit split,
Class<? extends org.apache.hadoop.io.Writable> keyClass,
Class<? extends org.apache.hadoop.io.Writable> valueClass)
throws IOException
- 抛出:
IOException
getProgress
public float getProgress()
throws IOException
- Return the progress within the input split
- 返回:
- 0.0 to 1.0 of the input byte range
- 抛出:
IOException
initialize
public void initialize(GuaguaFileSplit split)
throws IOException
- 指定者:
- 接口
GuaguaRecordReader<GuaguaWritableAdapter<KEY extends org.apache.hadoop.io.Writable>,GuaguaWritableAdapter<VALUE extends org.apache.hadoop.io.Writable>> 中的 initialize
- 抛出:
IOException
nextKeyValue
public boolean nextKeyValue()
throws IOException
- 指定者:
- 接口
GuaguaRecordReader<GuaguaWritableAdapter<KEY extends org.apache.hadoop.io.Writable>,GuaguaWritableAdapter<VALUE extends org.apache.hadoop.io.Writable>> 中的 nextKeyValue
- 抛出:
IOException
getCurrentKey
public GuaguaWritableAdapter<KEY> getCurrentKey()
- 指定者:
- 接口
GuaguaRecordReader<GuaguaWritableAdapter<KEY extends org.apache.hadoop.io.Writable>,GuaguaWritableAdapter<VALUE extends org.apache.hadoop.io.Writable>> 中的 getCurrentKey
getCurrentValue
public GuaguaWritableAdapter<VALUE> getCurrentValue()
- 指定者:
- 接口
GuaguaRecordReader<GuaguaWritableAdapter<KEY extends org.apache.hadoop.io.Writable>,GuaguaWritableAdapter<VALUE extends org.apache.hadoop.io.Writable>> 中的 getCurrentValue
close
public void close()
throws IOException
- 指定者:
- 接口
GuaguaRecordReader<GuaguaWritableAdapter<KEY extends org.apache.hadoop.io.Writable>,GuaguaWritableAdapter<VALUE extends org.apache.hadoop.io.Writable>> 中的 close
- 抛出:
IOException
Copyright © 2015. All Rights Reserved.