org.terrier.structures.indexing.singlepass.hadoop
Class MapData

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.hadoop.MapData
All Implemented Interfaces:
Comparable<MapData>

public class MapData
extends Object
implements Comparable<MapData>

Storage class for information about each Map. Stores the number of the Map, the number of documents processed by the map and the number of documents stored in each flush of the map.

Since:
2.2
Author:
Richard McCreadie

Field Summary
protected  LinkedList<Integer> flushDocSizes
          Number of Documents in each flush of the map
protected  int int_mapTaskId
          The map task id stored as an integer
protected static org.apache.log4j.Logger logger
           
protected  String mapTaskID
          TaskID of the Map
protected  int numMapDocs
          Number of Documents Processed by the Map
protected  int splitnum
          The Split number
 
Constructor Summary
MapData(DataInputStream in)
          Constructor - Loads the Map Information from the DataInputStream Provided
 
Method Summary
 int compareTo(MapData o)
          
 boolean equals(Object obj)
           
 LinkedList<Integer> getFlushDocSizes()
          Contains one element, for each run (aka flush) outputted by this map.
 String getMap()
          get map
 int getMapDocs()
          get mapDocs
 int getMapId()
          get map id
 int getSplitnum()
           
 int hashCode()
           
 void setMapDocs(int runDocs)
          set mapDocs
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

mapTaskID

protected String mapTaskID
TaskID of the Map


numMapDocs

protected int numMapDocs
Number of Documents Processed by the Map


flushDocSizes

protected LinkedList<Integer> flushDocSizes
Number of Documents in each flush of the map


splitnum

protected int splitnum
The Split number


int_mapTaskId

protected int int_mapTaskId
The map task id stored as an integer

Constructor Detail

MapData

public MapData(DataInputStream in)
        throws IOException
Constructor - Loads the Map Information from the DataInputStream Provided

Parameters:
in - - Stream of the Map data file
Throws:
IOException
Method Detail

getMap

public String getMap()
get map

Returns:
map task id

getMapId

public int getMapId()
get map id

Returns:
map task id as int

getMapDocs

public int getMapDocs()
get mapDocs

Returns:
number of docs in this map

setMapDocs

public void setMapDocs(int runDocs)
set mapDocs

Parameters:
runDocs -

getFlushDocSizes

public LinkedList<Integer> getFlushDocSizes()
Contains one element, for each run (aka flush) outputted by this map. The element is the number of documents covered by all previous runs in that map.


compareTo

public int compareTo(MapData o)

Specified by:
compareTo in interface Comparable<MapData>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getSplitnum

public int getSplitnum()
Returns:
the splitnum


Terrier 3.6. Copyright © 2004-2011 University of Glasgow