Terrier IR Platform
2.2.1

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

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

public class MapEmittedPostingList
extends WritableByteArray

Sub-Class of WritableByteArray with additional information about which Map and Flush it came from

Since:
2.2
Version:
$Revision: 1.2 $
Author:
Richard McCreadie

Constructor Summary
MapEmittedPostingList()
          Empty Constructor
MapEmittedPostingList(int c, int c2)
          Super Constructor
MapEmittedPostingList(java.lang.String map, int run, 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, byte[] postingList, int DocumentFreq, int TermFreq)
          Factory Method
 java.lang.String getMap()
           
 int getRun()
           
 void printArray()
           
 void readFields(java.io.DataInput arg0)
          Reads this object from the input stream 'in'
 void readFieldsMinusArray(java.io.DataInput arg0)
          Reads this object from the input stream 'in' apart from the array.
 void setMap(java.lang.String map)
           
 void setRun(int run)
           
 java.lang.String toString()
          Returns the Map & Flush Number
 void write(java.io.DataOutput arg0)
          Write this object to the output stream 'out'
 
Methods inherited from class uk.ac.gla.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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapEmittedPostingList

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

Parameters:
map - - Map task id
run - - Flush 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,
                                                                         byte[] postingList,
                                                                         int DocumentFreq,
                                                                         int TermFreq)
Factory Method

Parameters:
mapTaskID - - Map Number
flushNo - - Flush 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()

setMap

public void setMap(java.lang.String map)

getRun

public int getRun()

setRun

public void setRun(int run)

readFields

public void readFields(java.io.DataInput arg0)
                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 arg0)
                          throws java.io.IOException
Reads this object from the input stream 'in' apart from the array.

Parameters:
arg0 -
Throws:
java.io.IOException

write

public void write(java.io.DataOutput arg0)
           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()

Terrier IR Platform
2.2.1

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