Terrier IR Platform
2.2.1

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

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.singlepass.hadoop.MapEmittedTerm.TermMapFlushComparator
All Implemented Interfaces:
java.util.Comparator<MapEmittedTerm>, org.apache.hadoop.io.RawComparator<MapEmittedTerm>
Enclosing class:
MapEmittedTerm

public static class MapEmittedTerm.TermMapFlushComparator
extends java.lang.Object
implements org.apache.hadoop.io.RawComparator<MapEmittedTerm>

Raw Comparator class to compare MapEmittedTerm objects stage 1. (Order by term, then by map number, then by flush number)

Since:
2.2
Version:
$Revision: 1.2 $
Author:
Richard McCreadie and Craig Macdonald

Constructor Summary
MapEmittedTerm.TermMapFlushComparator()
           
 
Method Summary
 int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
          Compare by term (bit comparison on Text object) then by map number (int) then by flush number (int).
 int compare(MapEmittedTerm a, MapEmittedTerm b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

MapEmittedTerm.TermMapFlushComparator

public MapEmittedTerm.TermMapFlushComparator()
Method Detail

compare

public int compare(MapEmittedTerm a,
                   MapEmittedTerm b)
Specified by:
compare in interface java.util.Comparator<MapEmittedTerm>

compare

public int compare(byte[] b1,
                   int s1,
                   int l1,
                   byte[] b2,
                   int s2,
                   int l2)
Compare by term (bit comparison on Text object) then by map number (int) then by flush number (int).

Specified by:
compare in interface org.apache.hadoop.io.RawComparator<MapEmittedTerm>

Terrier IR Platform
2.2.1

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