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

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

public class MapData
extends java.lang.Object
implements java.lang.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  java.util.LinkedList<java.lang.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  java.lang.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(java.io.DataInputStream in)
          Constructor - Loads the Map Information from the DataInputStream Provided
 
Method Summary
 int compareTo(MapData o)
          
 boolean equals(java.lang.Object obj)
           
 java.util.LinkedList<java.lang.Integer> getFlushDocSizes()
          Contains one element, for each run (aka flush) outputted by this map.
 java.lang.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 java.lang.String mapTaskID
TaskID of the Map


numMapDocs

protected int numMapDocs
Number of Documents Processed by the Map


flushDocSizes

protected java.util.LinkedList<java.lang.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(java.io.DataInputStream in)
        throws java.io.IOException
Constructor - Loads the Map Information from the DataInputStream Provided

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

getMap

public java.lang.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 java.util.LinkedList<java.lang.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 java.lang.Comparable<MapData>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getSplitnum

public int getSplitnum()
Returns:
the splitnum


Terrier 3.5. Copyright © 2004-2011 University of Glasgow