Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing.singlepass.hadoop
Class HadoopRunPostingIterator

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.singlepass.RunIterator
      extended by uk.ac.gla.terrier.structures.indexing.singlepass.hadoop.HadoopRunPostingIterator
All Implemented Interfaces:
java.util.Iterator<PostingInRun>, Closeable

public class HadoopRunPostingIterator
extends RunIterator


Constructor Summary
HadoopRunPostingIterator(java.lang.Class<? extends PostingInRun> postingClass, int runNo, java.util.Iterator<MapEmittedPostingList> _postingiterator, java.lang.String _term)
          Constructs a new RunPostingIterator.
 
Method Summary
 java.lang.String getMapNo()
          Returns the map that the current posting came from
 boolean hasNext()
          Move to the next posting
 PostingInRun next()
          Return the next PostingInRun
 
Methods inherited from class uk.ac.gla.terrier.structures.indexing.singlepass.RunIterator
close, current, getRunNo, remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HadoopRunPostingIterator

public HadoopRunPostingIterator(java.lang.Class<? extends PostingInRun> postingClass,
                                int runNo,
                                java.util.Iterator<MapEmittedPostingList> _postingiterator,
                                java.lang.String _term)
                         throws java.lang.Exception
Constructs a new RunPostingIterator.

Parameters:
postingClass - is the name of the class to use to read the postings
runNo - is the number of the run
_postingiterator - is the iterator of reduce input data that we are going to loop through
_term - is the term that this iterator is operating on
Throws:
java.lang.Exception
Method Detail

hasNext

public boolean hasNext()
Move to the next posting

Specified by:
hasNext in interface java.util.Iterator<PostingInRun>
Specified by:
hasNext in class RunIterator

next

public PostingInRun next()
Return the next PostingInRun

Specified by:
next in interface java.util.Iterator<PostingInRun>
Specified by:
next in class RunIterator

getMapNo

public java.lang.String getMapNo()
Returns the map that the current posting came from


Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow