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

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.hadoop.WritableByteArray
      extended by org.terrier.structures.indexing.singlepass.hadoop.MapEmittedPostingList
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class MapEmittedPostingList
extends WritableByteArray

Sub-Class of WritableByteArray, i.e. the posting list, with additional information about which Map and Flush it came from.

Since:
2.2
Author:
Richard McCreadie

Field Summary
protected  int flushNo
          The Flush Number
protected  java.lang.String Map
          The Map Number
protected  int splitNo
          The Split Number
 
Fields inherited from class org.terrier.structures.indexing.singlepass.hadoop.WritableByteArray
array, arraylength, DocumentFreq, TermFreq
 
Constructor Summary
MapEmittedPostingList()
          Empty Constructor
MapEmittedPostingList(int c, int c2)
          Super Constructor
MapEmittedPostingList(java.lang.String map, int flush, int split, int c, int c2)
          Constructor
 
Method Summary
static MapEmittedPostingList create_Hadoop_WritableRunPostingData(byte[] postingList, int DocumentFreq, int TermFreq)
          Super Factory Method
static MapEmittedPostingList create_Hadoop_WritableRunPostingData(java.lang.String mapTaskID, int flushNo, int splitNo, byte[] postingList, int DocumentFreq, int TermFreq)
          Factory Method
 int getFlushNo()
          get flush no
 java.lang.String getMap()
          get Map
 int getSplitNo()
           
 void printArray()
          print array
 void readFields(java.io.DataInput in)
          Reads this object from the input stream 'in'
 void readFieldsMinusArray(java.io.DataInput in)
          Reads this object from the input stream 'in' apart from the array.
 void setFlushNo(int flush)
          set flush no
 void setMap(java.lang.String map)
          set map
 void setSplitNo(int _splitNo)
           
 java.lang.String toString()
          Returns the Map & Flush Number
 void write(java.io.DataOutput out)
          Write this object to the output stream 'out'
 
Methods inherited from class org.terrier.structures.indexing.singlepass.hadoop.WritableByteArray
create_Hadoop_WritableByteArray, create_Hadoop_WritableByteArray, create_Hadoop_WritableByteArray, getArray, getDocumentFreq, getTermFreq, setArray, setDocumentFreq, setTermFrequency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Map

protected java.lang.String Map
The Map Number


flushNo

protected int flushNo
The Flush Number


splitNo

protected int splitNo
The Split Number

Constructor Detail

MapEmittedPostingList

public MapEmittedPostingList(java.lang.String map,
                             int flush,
                             int split,
                             int c,
                             int c2)
Constructor

Parameters:
map - - Map task id
flush - - Flush Number
split - - Split Number
c - - Document Frequency
c2 - - Term Frequency

MapEmittedPostingList

public MapEmittedPostingList(int c,
                             int c2)
Super Constructor

Parameters:
c - - Document Frequency
c2 - - Term Frequency

MapEmittedPostingList

public MapEmittedPostingList()
Empty Constructor

Method Detail

create_Hadoop_WritableRunPostingData

public static MapEmittedPostingList create_Hadoop_WritableRunPostingData(java.lang.String mapTaskID,
                                                                         int flushNo,
                                                                         int splitNo,
                                                                         byte[] postingList,
                                                                         int DocumentFreq,
                                                                         int TermFreq)
Factory Method

Parameters:
mapTaskID - - Map Number
flushNo - - Flush Number
splitNo - - Split Number
postingList - - Posting List
DocumentFreq - - Document Frequency
TermFreq - - Term Frequency
Returns:
a newly created Indexing_WritableRunPostingData

create_Hadoop_WritableRunPostingData

public static MapEmittedPostingList create_Hadoop_WritableRunPostingData(byte[] postingList,
                                                                         int DocumentFreq,
                                                                         int TermFreq)
Super Factory Method

Parameters:
postingList - - Posting List
DocumentFreq - - Document Frequency
TermFreq - - Term Frequency
Returns:
a newly created Indexing_WritableRunPostingData

toString

public java.lang.String toString()
Returns the Map & Flush Number

Overrides:
toString in class WritableByteArray

getMap

public java.lang.String getMap()
get Map

Returns:
map

setMap

public void setMap(java.lang.String map)
set map

Parameters:
map -

getFlushNo

public int getFlushNo()
get flush no

Returns:
flush number

setFlushNo

public void setFlushNo(int flush)
set flush no

Parameters:
flush -

getSplitNo

public int getSplitNo()
Returns:
the splitNo

setSplitNo

public void setSplitNo(int _splitNo)
Parameters:
_splitNo - the splitNo to set

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Reads this object from the input stream 'in'

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class WritableByteArray
Throws:
java.io.IOException

readFieldsMinusArray

public void readFieldsMinusArray(java.io.DataInput in)
                          throws java.io.IOException
Reads this object from the input stream 'in' apart from the array.

Parameters:
in -
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Write this object to the output stream 'out'

Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class WritableByteArray
Throws:
java.io.IOException

printArray

public void printArray()
print array



Terrier 3.5. Copyright © 2004-2011 University of Glasgow