org.apache.hadoop.io.serializer
Class DeserializerComparator<T>
java.lang.Object
   org.apache.hadoop.io.serializer.DeserializerComparator<T>
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.
 
 
| 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 | 
 
 
DeserializerComparator
protected DeserializerComparator(Deserializer<T> deserializer)
                          throws IOException
- Throws:
- IOException
compare
public int compare(byte[] b1,
                   int s1,
                   int l1,
                   byte[] b2,
                   int s2,
                   int l2)
- 
- Specified by:
- comparein interface- RawComparator<T>
 
- 
 
Copyright © 2009 The Apache Software Foundation