@InterfaceAudience.Public @InterfaceStability.Stable public class KeyValueLineRecordReader extends Object implements RecordReader<Text,Text>
构造函数及描述 |
---|
KeyValueLineRecordReader(Configuration job,
FileSplit split) |
修饰符和类型 | 方法和描述 |
---|---|
void |
关闭()
Close this
InputSplit to future operations. |
Text |
创建密钥()
创建一个适当类型的对象用作键。
|
Text |
createValue()
创建一个适当类型的对象作为值使用。
|
static int |
findSeparator(byte[] utf,
int start,
int length,
byte sep) |
类 |
getKeyClass() |
long |
getPos()
返回输入中的当前位置。
|
float |
getProgress()
How much of the input has the
RecordReader consumed i.e. |
boolean |
next(Text key,
Text value)
读取一行中的键/值对。
|
public KeyValueLineRecordReader(Configuration job, FileSplit split) throws IOException
IOException
public Class getKeyClass()
public Text createKey()
RecordReader
createKey
在接口中 RecordReader<Text,Text>
public Text createValue()
RecordReader
createValue
在接口中 RecordReader<Text,Text>
public static int findSeparator(byte[] utf, int start, int length, byte sep)
public boolean next(Text key, Text value) throws IOException
next
在接口 RecordReader<Text,Text>
中key
- 要读取数据的键value
- 要读取数据的值IOException
public float getProgress() throws IOException
RecordReader
RecordReader
已消耗了多少输入数据,即已被处理的部分。getProgress
在接口中 RecordReader<Text,Text>
0.0
到1.0
。IOException
public long getPos() throws IOException
RecordReader
getPos
在接口 RecordReader<Text,Text>
IOException
public void close() throws IOException
RecordReader
InputSplit
以禁止后续操作。close
在接口 Closeable
close
在接口 AutoCloseable
close
在接口 RecordReader<Text,Text>
IOException
版权所有 © 2024 Apache软件基金会。保留所有权利。