Terrier IR Platform
2.2.1

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

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.singlepass.hadoop.MapEmittedTerm
All Implemented Interfaces:
java.lang.Comparable<MapEmittedTerm>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<MapEmittedTerm>

public class MapEmittedTerm
extends java.lang.Object
implements org.apache.hadoop.io.WritableComparable<MapEmittedTerm>

Represents a term emitted during indexing time. Each term also has a the map number and flush number that is was emitted from.

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

Nested Class Summary
static class MapEmittedTerm.TermComparator
          Comparator for MapEmittedTerm objects - order only by Term.
static class MapEmittedTerm.TermMapFlushComparator
          Raw Comparator class to compare MapEmittedTerm objects stage 1.
 
Constructor Summary
MapEmittedTerm()
          Empty Constructor
MapEmittedTerm(java.lang.String s, java.lang.String _mapTaskID, int _flushNumber)
          Constructor
 
Method Summary
 int compareTo(MapEmittedTerm o)
          Text Comparator on the Term contained in this object
static MapEmittedTerm create_TextPlus(java.lang.String s, java.lang.String a, int b)
          Factory Method
 int getFlush()
           
 java.lang.String getMap()
           
 org.apache.hadoop.io.Text getText()
           
 void readFields(java.io.DataInput in)
          Reads in this object from the Input Stream 'in'
 void setFlush(int flush)
           
 void setMap(java.lang.String id)
           
 void setText(org.apache.hadoop.io.Text text)
           
 void write(java.io.DataOutput out)
          Writes this object to the Output Stream 'out'
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapEmittedTerm

public MapEmittedTerm()
Empty Constructor


MapEmittedTerm

public MapEmittedTerm(java.lang.String s,
                      java.lang.String _mapTaskID,
                      int _flushNumber)
Constructor

Parameters:
s - - Term
_mapTaskID - - Map Number
_flushNumber - - Flush Number
Method Detail

create_TextPlus

public static MapEmittedTerm create_TextPlus(java.lang.String s,
                                             java.lang.String a,
                                             int b)
Factory Method

Parameters:
s - - Term
a - - Map Number
b - - Flush Number
Returns:
a newly created Indexing_TextPlus

getMap

public java.lang.String getMap()

setMap

public void setMap(java.lang.String id)

getFlush

public int getFlush()

setFlush

public void setFlush(int flush)

getText

public org.apache.hadoop.io.Text getText()

setText

public void setText(org.apache.hadoop.io.Text text)

readFields

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

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

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Writes this object to the Output Stream 'out'

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

compareTo

public int compareTo(MapEmittedTerm o)
Text Comparator on the Term contained in this object

Specified by:
compareTo in interface java.lang.Comparable<MapEmittedTerm>

Terrier IR Platform
2.2.1

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