@InterfaceAudience.Public @InterfaceStability.Stable public abstract class CombineFileRecordReaderWrapperextends Object implements RecordReader
CombineFileRecordReader
所要求的特定构造函数签名。
由于构造函数的要求,需要通过子类化来获得具体的记录读取器包装类。修饰符 | 构造函数和描述 |
---|---|
protected |
CombineFileRecordReaderWrapper(FileInputFormat<K,V> inputFormat,
CombineFileSplit split,
Configuration conf,
Reporter reporter,
Integer idx) |
修饰符和类型 | 方法和描述 |
---|---|
void |
关闭()
Close this
InputSplit to future operations. |
K |
创建密钥()
创建一个适当类型的对象用作键。
|
V |
createValue()
创建一个适当类型的对象作为值使用。
|
long |
getPos()
返回输入中的当前位置。
|
float |
getProgress()
How much of the input has the
RecordReader consumed i.e. |
boolean |
next(K key,
V value)
从输入中读取下一个键/值对以供处理。
|
protected CombineFileRecordReaderWrapper(FileInputFormat<K,V> inputFormat, CombineFileSplit split, Configuration conf, Reporter reporter, Integer idx) throws IOException
IOException
public boolean next(K key, V value) throws IOException
RecordReader
next
在接口中 RecordReader<K,V>
key
- 要读取数据的键value
- 要读取数据的值IOException
public K createKey()
RecordReader
createKey
在接口中 RecordReader<K,V>
public V createValue()
RecordReader
createValue
在接口中 RecordReader<K,V>
public long getPos() throws IOException
RecordReader
getPos
在接口中 RecordReader<K,V>
IOException
public void close() throws IOException
RecordReader
InputSplit
以禁止后续操作。close
在接口 Closeable
中close
在接口 AutoCloseable
中close
在接口 RecordReader<K,V>
中IOException
public float getProgress() throws IOException
RecordReader
RecordReader
已消耗了多少输入数据,即已被处理的部分。getProgress
在接口 RecordReader<K,V>
0.0
到1.0
。IOException
版权所有 © 2024 Apache软件基金会。保留所有权利。