public static class TrecDocumentInputFormatOld.TrecDocumentRecordReader extends Object implements org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecDocument>
RecordReader for reading TREC-formatted documents.| Constructor and Description |
|---|
TrecDocumentInputFormatOld.TrecDocumentRecordReader(org.apache.hadoop.mapred.FileSplit split,
org.apache.hadoop.mapred.JobConf conf)
Creates a
TrecDocumentRecordReader. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this
InputSplit. |
org.apache.hadoop.io.LongWritable |
createKey()
Creates an object for the key.
|
TrecDocument |
createValue()
Creates an object for the value.
|
long |
getPos()
Returns the current position in the input.
|
float |
getProgress()
Returns progress on how much input has been consumed.
|
boolean |
next(org.apache.hadoop.io.LongWritable key,
TrecDocument value)
Reads the next key-value pair.
|
public TrecDocumentInputFormatOld.TrecDocumentRecordReader(org.apache.hadoop.mapred.FileSplit split,
org.apache.hadoop.mapred.JobConf conf)
throws IOException
TrecDocumentRecordReader.IOExceptionpublic boolean next(org.apache.hadoop.io.LongWritable key,
TrecDocument value)
throws IOException
next in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecDocument>IOExceptionpublic org.apache.hadoop.io.LongWritable createKey()
createKey in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecDocument>public TrecDocument createValue()
createValue in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecDocument>public long getPos()
throws IOException
getPos in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecDocument>IOExceptionpublic void close()
throws IOException
InputSplit.close in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecDocument>IOExceptionpublic float getProgress()
throws IOException
getProgress in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecDocument>IOExceptionCopyright © 2015. All rights reserved.