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
- IOException
public void close() throws IOException
RecordReader
InputSplit
to future operations.close
在接口中 RecordReader<DocumentID,LineDocTextAndOp>
IOException
public DocumentID createKey()
RecordReader
createKey
在接口中 RecordReader<DocumentID,LineDocTextAndOp>
public LineDocTextAndOp createValue()
RecordReader
createValue
在接口中 RecordReader<DocumentID,LineDocTextAndOp>
public long getPos() throws IOException
RecordReader
getPos
在接口中 RecordReader<DocumentID,LineDocTextAndOp>
IOException
public float getProgress() throws IOException
RecordReader
RecordReader
consumed i.e.
has been processed by?getProgress
在接口中 RecordReader<DocumentID,LineDocTextAndOp>
0.0
to 1.0
.IOException
public boolean next(DocumentID key, LineDocTextAndOp value) throws IOException
RecordReader
next
在接口中 RecordReader<DocumentID,LineDocTextAndOp>
key
- the key to read data intovalue
- the value to read data intoIOException
Copyright © 2009 The Apache Software Foundation