org.terrier.structures.indexing.singlepass.hadoop
Class SplitEmittedTerm.SETRawComparatorTermSplitFlush

java.lang.Object
  extended by org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm.SETRawComparatorTermSplitFlush
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<SplitEmittedTerm>, org.apache.hadoop.io.RawComparator<SplitEmittedTerm>
Enclosing class:
SplitEmittedTerm

public static class SplitEmittedTerm.SETRawComparatorTermSplitFlush
extends java.lang.Object
implements org.apache.hadoop.io.RawComparator<SplitEmittedTerm>, java.io.Serializable

A comparator for comparing different split emitted terms. Note that this is a RAW comparator, i.e. the compare method that gets called is the byte[] one.

See Also:
Serialized Form

Constructor Summary
SplitEmittedTerm.SETRawComparatorTermSplitFlush()
           
 
Method Summary
 int compare(byte[] bterm1, int offset1, int length1, byte[] bterm2, int offset2, int length2)
          Compares raw Term key 1 to raw Term key 2.
 int compare(SplitEmittedTerm term1, SplitEmittedTerm term2)
          Compares Term key 1 to Term key 2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

SplitEmittedTerm.SETRawComparatorTermSplitFlush

public SplitEmittedTerm.SETRawComparatorTermSplitFlush()
Method Detail

compare

public int compare(byte[] bterm1,
                   int offset1,
                   int length1,
                   byte[] bterm2,
                   int offset2,
                   int length2)
Compares raw Term key 1 to raw Term key 2. Note that terms are unique only in conjunction with their associated split and flush.

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

compare

public int compare(SplitEmittedTerm term1,
                   SplitEmittedTerm term2)
Compares Term key 1 to Term key 2. Note that terms are unique only in conjunction with their associated split and flush.

Specified by:
compare in interface java.util.Comparator<SplitEmittedTerm>


Terrier 3.5. Copyright © 2004-2011 University of Glasgow