|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.structures.indexing.singlepass.RunWriter
uk.ac.gla.terrier.structures.indexing.singlepass.hadoop.HadoopRunWriter
public class HadoopRunWriter
RunWriter for the MapReduce indexer
| Constructor Summary | |
|---|---|
HadoopRunWriter(org.apache.hadoop.mapred.OutputCollector<MapEmittedTerm,MapEmittedPostingList> _outputCollector,
java.lang.String _mapId,
int _flushNo)
Create a new HadoopRunWriter, specifying the output collector of the map task the run number and the flush number. |
|
| Method Summary | |
|---|---|
void |
beginWrite(int maxSize,
int size)
Writes the headers of the run. |
void |
finishWrite()
Closes the output streams. |
boolean |
writeSorted()
This RunWriter does not require that the output be sorted. |
void |
writeTerm(java.lang.String term,
Posting post)
Write the posting to the output collector |
| Methods inherited from class uk.ac.gla.terrier.structures.indexing.singlepass.RunWriter |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HadoopRunWriter(org.apache.hadoop.mapred.OutputCollector<MapEmittedTerm,MapEmittedPostingList> _outputCollector,
java.lang.String _mapId,
int _flushNo)
_outputCollector - where to emit the posting lists to_mapId - the task id of the map currently being processed_flushNo - the number of times that this map task has flushed| Method Detail |
|---|
public void beginWrite(int maxSize,
int size)
throws java.io.IOException
RunWriter
beginWrite in class RunWritermaxSize - max size of a posting.size - number of postings in the run.
java.io.IOException - if an I/O error occurs.
public void writeTerm(java.lang.String term,
Posting post)
throws java.io.IOException
writeTerm in class RunWriterterm - the term to write.post - the Posting with the data of the term.
java.io.IOException - if an I/O error occurs.
public void finishWrite()
throws java.io.IOException
RunWriter
finishWrite in class RunWriterjava.io.IOException - if an I/O error occurs.public boolean writeSorted()
writeSorted in class RunWriter
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||