edu.umd.cloud9.collection.trecweb
Class TrecWebDocumentInputFormat.TrecWebRecordReader

java.lang.Object
  extended by edu.umd.cloud9.collection.trecweb.TrecWebDocumentInputFormat.TrecWebRecordReader
All Implemented Interfaces:
RecordReader<LongWritable,TrecWebDocument>
Enclosing class:
TrecWebDocumentInputFormat

public static class TrecWebDocumentInputFormat.TrecWebRecordReader
extends Object
implements RecordReader<LongWritable,TrecWebDocument>

Hadoop RecordReader for reading TREC-formatted documents.


Constructor Summary
TrecWebDocumentInputFormat.TrecWebRecordReader(FileSplit split, JobConf conf)
          Creates a TrecDocumentRecordReader.
 
Method Summary
 void close()
          Closes this InputSplit.
 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(LongWritable key, TrecWebDocument value)
          Reads the next key-value pair.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrecWebDocumentInputFormat.TrecWebRecordReader

public TrecWebDocumentInputFormat.TrecWebRecordReader(FileSplit split,
                                                      JobConf conf)
                                               throws IOException
Creates a TrecDocumentRecordReader.

Throws:
IOException
Method Detail

next

public boolean next(LongWritable key,
                    TrecWebDocument value)
             throws IOException
Reads the next key-value pair.

Specified by:
next in interface RecordReader<LongWritable,TrecWebDocument>
Throws:
IOException

createKey

public LongWritable createKey()
Creates an object for the key.

Specified by:
createKey in interface RecordReader<LongWritable,TrecWebDocument>

createValue

public TrecWebDocument createValue()
Creates an object for the value.

Specified by:
createValue in interface RecordReader<LongWritable,TrecWebDocument>

getPos

public long getPos()
            throws IOException
Returns the current position in the input.

Specified by:
getPos in interface RecordReader<LongWritable,TrecWebDocument>
Throws:
IOException

close

public void close()
           throws IOException
Closes this InputSplit.

Specified by:
close in interface RecordReader<LongWritable,TrecWebDocument>
Throws:
IOException

getProgress

public float getProgress()
                  throws IOException
Returns progress on how much input has been consumed.

Specified by:
getProgress in interface RecordReader<LongWritable,TrecWebDocument>
Throws:
IOException