public class SequenceFileRecordReader<K,V> extends Object implements RecordReader<K,V>
RecordReader for SequenceFiles.| 限定符和类型 | 字段和说明 |
|---|---|
protected Configuration |
conf |
| 构造器和说明 |
|---|
SequenceFileRecordReader(Configuration conf,
FileSplit split) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close this
InputSplit to future operations. |
K |
createKey()
Create an object of the appropriate type to be used as a key.
|
V |
createValue()
Create an object of the appropriate type to be used as a value.
|
protected void |
getCurrentValue(V value) |
Class |
getKeyClass()
The class of key that must be passed to
next(Object, Object).. |
long |
getPos()
Returns the current position in the input.
|
float |
getProgress()
Return the progress within the input split
|
Class |
getValueClass()
The class of value that must be passed to
next(Object, Object).. |
protected boolean |
next(K key) |
boolean |
next(K key,
V value)
Reads the next key/value pair from the input for processing.
|
protected void |
seek(long pos) |
protected Configuration conf
public SequenceFileRecordReader(Configuration conf, FileSplit split) throws IOException
IOExceptionpublic Class getKeyClass()
next(Object, Object)..public Class getValueClass()
next(Object, Object)..public K createKey()
RecordReadercreateKey 在接口中 RecordReader<K,V>public V createValue()
RecordReadercreateValue 在接口中 RecordReader<K,V>public boolean next(K key, V value) throws IOException
RecordReadernext 在接口中 RecordReader<K,V>key - the key to read data intovalue - the value to read data intoIOExceptionprotected boolean next(K key) throws IOException
IOExceptionprotected void getCurrentValue(V value) throws IOException
IOExceptionpublic float getProgress()
throws IOException
getProgress 在接口中 RecordReader<K,V>IOExceptionpublic long getPos()
throws IOException
RecordReadergetPos 在接口中 RecordReader<K,V>IOExceptionprotected void seek(long pos)
throws IOException
IOExceptionpublic void close()
throws IOException
RecordReaderInputSplit to future operations.close 在接口中 RecordReader<K,V>IOExceptionCopyright © 2009 The Apache Software Foundation