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
IOExceptionpublic 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 intoIOExceptionpublic long getPos()
throws IOException
getPos 在接口中 RecordReader<Text,Text>IOExceptionpublic void close()
throws IOException
close 在接口中 RecordReader<Text,Text>IOExceptionpublic float getProgress()
throws IOException
RecordReaderRecordReader consumed i.e.
has been processed by?getProgress 在接口中 RecordReader<Text,Text>0.0 to 1.0.IOExceptionpublic Text createKey()
RecordReadercreateKey 在接口中 RecordReader<Text,Text>public Text createValue()
RecordReadercreateValue 在接口中 RecordReader<Text,Text>public abstract void seekNextRecordBoundary()
throws IOException
IOExceptionCopyright © 2009 The Apache Software Foundation