SecondarySort.FirstGroupingComparator (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.examples
Class SecondarySort.FirstGroupingComparator

    java.lang.Object
      org.apache.hadoop.examples.SecondarySort.FirstGroupingComparator

All Implemented Interfaces:
  Comparator<SecondarySort.IntPair>, RawComparator<SecondarySort.IntPair>

Enclosing class:
  SecondarySort

    public static class SecondarySort.FirstGroupingComparator

extends Object
implements RawComparator<SecondarySort.IntPair>

Compare only the first part of the pair, so that reduce is called once for each value of the first part.

Constructor Summary
`SecondarySort.FirstGroupingComparator()`

Method Summary
`int` | `compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)`
`int` | `compare(SecondarySort.IntPair o1, SecondarySort.IntPair o2)`

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

### SecondarySort.FirstGroupingComparator

    public SecondarySort.FirstGroupingComparator()

Method Detail

### compare

    public int compare(byte[] b1,
                       int s1,
                       int l1,
                       byte[] b2,
                       int s2,
                       int l2)

  Specified by:
    `compare` in interface `RawComparator<SecondarySort.IntPair>`

### compare

    public int compare(SecondarySort.IntPair o1,
                       SecondarySort.IntPair o2)

  Specified by:
    `compare` in interface `Comparator<SecondarySort.IntPair>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation