cascading.tuple.hadoop.util

## Class DeserializerComparator<T>

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

- All Implemented Interfaces:
    Comparator<T>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.RawComparator<T>
  Direct Known Subclasses:
    BaseTupleComparator, CoGroupingComparator, GroupingComparator, GroupingSortingComparator, IndexTupleCoGroupingComparator

      public abstract class DeserializerComparator<T>
      extends org.apache.hadoop.conf.Configured
      implements org.apache.hadoop.io.RawComparator<T>

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Comparator[]` | `groupComparators`
    `protected Class[]` | `keyTypes`
    `protected BufferedInputStream` | `lhsBuffer`
    `protected HadoopTupleInputStream` | `lhsStream`
    `protected BufferedInputStream` | `rhsBuffer`
    `protected HadoopTupleInputStream` | `rhsStream`
    `protected TupleSerialization` | `tupleSerialization`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeserializerComparator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `canPerformRawComparisons()`
    `protected int` | `compareTuples(Class[] types, Comparator[] comparators)`
    `protected int` | `compareTuples(Comparator[] comparators, Tuple lhs, Tuple rhs)`
    `static Comparator[]` | `getFieldComparatorsFrom(org.apache.hadoop.conf.Configuration conf, String name)`
    `protected HadoopTupleInputStream` | `getHadoopTupleInputStream(BufferedInputStream lhsBuffer, TupleSerialization.SerializationElementReader elementReader)`
    `protected boolean` | `performRawComparison()`
    `void` | `setConf(org.apache.hadoop.conf.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 BufferedInputStream lhsBuffer

    - #### rhsBuffer

          protected BufferedInputStream rhsBuffer

    - #### tupleSerialization

          protected TupleSerialization tupleSerialization

    - #### lhsStream

          protected HadoopTupleInputStream lhsStream

    - #### rhsStream

          protected HadoopTupleInputStream rhsStream

    - #### keyTypes

          protected Class[] keyTypes

    - #### groupComparators

          protected Comparator[] groupComparators

  - ### Constructor Detail

    - #### DeserializerComparator

          public DeserializerComparator()

  - ### Method Detail

    - #### canPerformRawComparisons

          protected boolean canPerformRawComparisons()

    - #### performRawComparison

          protected boolean performRawComparison()

    - #### setConf

          public void setConf(org.apache.hadoop.conf.Configuration conf)

      Specified by:
        `setConf` in interface `org.apache.hadoop.conf.Configurable`
      Overrides:
        `setConf` in class `org.apache.hadoop.conf.Configured`

    - #### getHadoopTupleInputStream

          protected HadoopTupleInputStream getHadoopTupleInputStream(BufferedInputStream lhsBuffer,
                                                         TupleSerialization.SerializationElementReader elementReader)

    - #### getFieldComparatorsFrom

          public static Comparator[] getFieldComparatorsFrom(org.apache.hadoop.conf.Configuration conf,
                                             String name)

    - #### compareTuples

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

    - #### compareTuples

          protected final int compareTuples(Class[] types,
                          Comparator[] comparators)
                                     throws IOException

      Throws:
        `IOException`

Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.