public class LineDocRecordReader extends Object implements RecordReader<DocumentID,LineDocTextAndOp>
| 构造器和说明 |
|---|
LineDocRecordReader(Configuration job,
FileSplit split)
Constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close this
InputSplit to future operations. |
DocumentID |
createKey()
Create an object of the appropriate type to be used as a key.
|
LineDocTextAndOp |
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. |
boolean |
next(DocumentID key,
LineDocTextAndOp value)
Reads the next key/value pair from the input for processing.
|
public LineDocRecordReader(Configuration job, FileSplit split) throws IOException
job - split - IOExceptionpublic void close()
throws IOException
RecordReaderInputSplit to future operations.close 在接口中 RecordReader<DocumentID,LineDocTextAndOp>IOExceptionpublic DocumentID createKey()
RecordReadercreateKey 在接口中 RecordReader<DocumentID,LineDocTextAndOp>public LineDocTextAndOp createValue()
RecordReadercreateValue 在接口中 RecordReader<DocumentID,LineDocTextAndOp>public long getPos()
throws IOException
RecordReadergetPos 在接口中 RecordReader<DocumentID,LineDocTextAndOp>IOExceptionpublic float getProgress()
throws IOException
RecordReaderRecordReader consumed i.e.
has been processed by?getProgress 在接口中 RecordReader<DocumentID,LineDocTextAndOp>0.0 to 1.0.IOExceptionpublic boolean next(DocumentID key, LineDocTextAndOp value) throws IOException
RecordReadernext 在接口中 RecordReader<DocumentID,LineDocTextAndOp>key - the key to read data intovalue - the value to read data intoIOExceptionCopyright © 2009 The Apache Software Foundation