public class KeyValueLineRecordReader extends Object implements RecordReader<Text,Text>
构造器和说明 |
---|
KeyValueLineRecordReader(Configuration job,
FileSplit split) |
限定符和类型 | 方法和说明 |
---|---|
void |
close()
Close this
InputSplit to future operations. |
Text |
createKey()
Create an object of the appropriate type to be used as a key.
|
Text |
createValue()
Create an object of the appropriate type to be used as a value.
|
static int |
findSeparator(byte[] utf,
int start,
int length,
byte sep) |
Class |
getKeyClass() |
long |
getPos()
Returns the current position in the input.
|
float |
getProgress()
How much of the input has the
RecordReader consumed i.e. |
boolean |
next(Text key,
Text value)
Read key/value pair in a line.
|
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
- the key to read data intovalue
- the value to read data intoIOException
public float getProgress() throws IOException
RecordReader
RecordReader
consumed i.e.
has been processed by?getProgress
在接口中 RecordReader<Text,Text>
0.0
to 1.0
.IOException
public long getPos() throws IOException
RecordReader
getPos
在接口中 RecordReader<Text,Text>
IOException
public void close() throws IOException
RecordReader
InputSplit
to future operations.close
在接口中 RecordReader<Text,Text>
IOException
Copyright © 2009 The Apache Software Foundation