cascading.tuple.hadoop.util

## Class DeserializerComparator<T>

- java.lang.Object
- - org.apache.hadoop.conf.Configured
  - - cascading.tuple.hadoop.util.DeserializerComparator<T>

All Implemented Interfaces:
  java.util.Comparator<T>, Configurable, RawComparator<T>

Direct Known Subclasses:
  BaseTupleComparator, CoGroupingComparator, GroupingComparator, GroupingSortingComparator, IndexTupleCoGroupingComparator

    public abstract class DeserializerComparator<T>
    extends Configured
    implements RawComparator<T>

Class DeserializerComparator is the base class for all Cascading comparator classes.

### Field Summary

Fields
`protected java.util.Comparator[]` `groupComparators`
`protected java.lang.Class[]` `keyTypes`
`protected cascading.tuple.hadoop.io.BufferedInputStream` `lhsBuffer`
`protected cascading.tuple.hadoop.io.HadoopTupleInputStream` `lhsStream`
`protected cascading.tuple.hadoop.io.BufferedInputStream` `rhsBuffer`
`protected cascading.tuple.hadoop.io.HadoopTupleInputStream` `rhsStream`
`protected cascading.tuple.hadoop.TupleSerialization` `tupleSerialization`

### Constructor Summary

Constructors
Constructor and Description
`DeserializerComparator()`

### Method Summary

Methods
`protected boolean` `canPerformRawComparisons()`
`protected int` `compareTuples(java.lang.Class[] types, java.util.Comparator[] comparators)`
`protected int` `compareTuples(java.util.Comparator[] comparators, Tuple lhs, Tuple rhs)`
`static java.util.Comparator[]` `getFieldComparatorsFrom(Configuration conf, java.lang.String name)`
`protected cascading.tuple.hadoop.io.HadoopTupleInputStream` `getHadoopTupleInputStream(cascading.tuple.hadoop.io.BufferedInputStream lhsBuffer, cascading.tuple.hadoop.TupleSerialization.SerializationElementReader elementReader)`
`protected boolean` `performRawComparison()`
`void` `setConf(Configuration conf)`

### Methods inherited from class org.apache.hadoop.conf.Configured

`getConf`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.hadoop.io.RawComparator

`compare`

### Methods inherited from interface java.util.Comparator

`compare, equals`

### Field Detail

#### lhsBuffer

    protected cascading.tuple.hadoop.io.BufferedInputStream lhsBuffer

#### rhsBuffer

    protected cascading.tuple.hadoop.io.BufferedInputStream rhsBuffer

#### tupleSerialization

    protected cascading.tuple.hadoop.TupleSerialization tupleSerialization

#### lhsStream

    protected cascading.tuple.hadoop.io.HadoopTupleInputStream lhsStream

#### rhsStream

    protected cascading.tuple.hadoop.io.HadoopTupleInputStream rhsStream

#### keyTypes

    protected java.lang.Class[] keyTypes

#### groupComparators

    protected java.util.Comparator[] groupComparators

### Constructor Detail

#### DeserializerComparator

    public DeserializerComparator()

### Method Detail

#### canPerformRawComparisons

    protected boolean canPerformRawComparisons()

#### performRawComparison

    protected boolean performRawComparison()

#### setConf

    public void setConf(Configuration conf)

Specified by:
  `setConf` in interface `Configurable`
Overrides:
  `setConf` in class `Configured`

#### getHadoopTupleInputStream

    protected cascading.tuple.hadoop.io.HadoopTupleInputStream getHadoopTupleInputStream(cascading.tuple.hadoop.io.BufferedInputStream lhsBuffer,
                                                                             cascading.tuple.hadoop.TupleSerialization.SerializationElementReader elementReader)

#### getFieldComparatorsFrom

    public static java.util.Comparator[] getFieldComparatorsFrom(Configuration conf,
                                                 java.lang.String name)

#### compareTuples

    protected final int compareTuples(java.util.Comparator[] comparators,
                    Tuple lhs,
                    Tuple rhs)

#### compareTuples

    protected final int compareTuples(java.lang.Class[] types,
                    java.util.Comparator[] comparators)
                               throws java.io.IOException

Throws:
  `java.io.IOException`