public abstract class StreamBaseRecordReader extends Object implements RecordReader<Text,Text>
限定符和类型 | 字段和说明 |
---|---|
protected static org.apache.commons.logging.Log |
LOG |
构造器和说明 |
---|
StreamBaseRecordReader(FSDataInputStream in,
FileSplit split,
Reporter reporter,
JobConf job,
FileSystem fs) |
限定符和类型 | 方法和说明 |
---|---|
void |
close()
Close this 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.
|
long |
getPos()
Returns the current position in the input.
|
float |
getProgress()
How much of the input has the
RecordReader consumed i.e. |
abstract boolean |
next(Text key,
Text value)
Read a record.
|
abstract void |
seekNextRecordBoundary()
Implementation should seek forward in_ to the first byte of the next record.
|
public StreamBaseRecordReader(FSDataInputStream in, FileSplit split, Reporter reporter, JobConf job, FileSystem fs) throws IOException
IOException
public abstract 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 long getPos() throws IOException
getPos
在接口中 RecordReader<Text,Text>
IOException
public void close() throws IOException
close
在接口中 RecordReader<Text,Text>
IOException
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 Text createKey()
RecordReader
createKey
在接口中 RecordReader<Text,Text>
public Text createValue()
RecordReader
createValue
在接口中 RecordReader<Text,Text>
public abstract void seekNextRecordBoundary() throws IOException
IOException
Copyright © 2009 The Apache Software Foundation