public static class TrecWebDocumentInputFormatOld.TrecWebRecordReader extends Object implements org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecWebDocument>
RecordReader for reading TREC-formatted documents.| Constructor and Description |
|---|
TrecWebDocumentInputFormatOld.TrecWebRecordReader(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.
|
TrecWebDocument |
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,
TrecWebDocument value)
Reads the next key-value pair.
|
public TrecWebDocumentInputFormatOld.TrecWebRecordReader(org.apache.hadoop.mapred.FileSplit split,
org.apache.hadoop.mapred.JobConf conf)
throws IOException
TrecDocumentRecordReader.IOExceptionpublic boolean next(org.apache.hadoop.io.LongWritable key,
TrecWebDocument value)
throws IOException
next in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecWebDocument>IOExceptionpublic org.apache.hadoop.io.LongWritable createKey()
createKey in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecWebDocument>public TrecWebDocument createValue()
createValue in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecWebDocument>public long getPos()
throws IOException
getPos in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecWebDocument>IOExceptionpublic void close()
throws IOException
close in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecWebDocument>IOExceptionpublic float getProgress()
throws IOException
getProgress in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,TrecWebDocument>IOExceptionCopyright © 2015. All rights reserved.