DeserializerComparator (Hadoop 0.20.2-cdh3u4 API)
Date: 2012-05-07

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.io.serializer
Class DeserializerComparator<T>

    java.lang.Object
      org.apache.hadoop.io.serializer.DeserializerComparator<T>

Type Parameters:
  `T` -

All Implemented Interfaces:
  Comparator<T>, RawComparator<T>

Direct Known Subclasses:
  JavaSerializationComparator

    public abstract class DeserializerComparator<T>

extends Object
implements RawComparator<T>

A `RawComparator` that uses a `Deserializer` to deserialize the objects to be compared so that the standard `Comparator` can be used to compare them.

One may optimize compare-intensive operations by using a custom implementation of `RawComparator` that operates directly on byte representations.

Constructor Summary
`protected` | `DeserializerComparator(Deserializer<T> deserializer)`

Method Summary
`int` | `compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)`

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
`compare, equals`

Constructor Detail

### DeserializerComparator

    protected DeserializerComparator(Deserializer<T> deserializer)
                              throws IOException

Throws:
  `IOException`

Method Detail

### compare

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

  Specified by:
    `compare` in interface `RawComparator<T>`

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