cascading.flow.hadoop

## Class HadoopGroupByClosure

- java.lang.Object
- - cascading.pipe.joiner.JoinerClosure
  - - cascading.flow.hadoop.HadoopGroupByClosure

- Direct Known Subclasses:
    HadoopCoGroupClosure, TezGroupByClosure

      public class HadoopGroupByClosure
      extends JoinerClosure

  Class GroupClosure is used internally to represent groups of tuples during grouping.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Tuple` | `grouping`
    `protected java.util.Iterator[]` | `values`

    - ### Fields inherited from class cascading.pipe.joiner.JoinerClosure

      `flowProcess, joinFields, valueFields`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HadoopGroupByClosure(FlowProcess flowProcess, Fields[] groupingFields, Fields[] valueFields)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Tuple` | `getGrouping()`
    `Tuple` | `getGroupTuple(Tuple keysTuple)`
    `java.util.Iterator<Tuple>` | `getIterator(int pos)` Returns a Tuple Iterator for the given pipe position.
    `protected java.util.Iterator` | `getValueIterator(int pos)`
    `boolean` | `isEmpty(int pos)`
    `protected java.util.Iterator<Tuple>` | `makeIterator(int pos, java.util.Iterator values)`
    `void` | `reset(Tuple grouping, java.util.Iterator<Tuple>[] values)`
    `int` | `size()`

    - ### Methods inherited from class cascading.pipe.joiner.JoinerClosure

      `getFlowProcess, getJoinFields, getValueFields, isSelfJoin`

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

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

- - ### Field Detail

    - #### grouping

          protected Tuple grouping

    - #### values

          protected java.util.Iterator[] values

  - ### Constructor Detail

    - #### HadoopGroupByClosure

          public HadoopGroupByClosure(FlowProcess flowProcess,
                              Fields[] groupingFields,
                              Fields[] valueFields)

  - ### Method Detail

    - #### getGrouping

          public Tuple getGrouping()

    - #### size

          public int size()

      Specified by:
        `size` in class `JoinerClosure`

    - #### getValueIterator

          protected java.util.Iterator getValueIterator(int pos)

    - #### getIterator

          public java.util.Iterator<Tuple> getIterator(int pos)

      Description copied from class: `JoinerClosure`
      Returns a Tuple Iterator for the given pipe position. Position 0 is the most left handed pipe passed to the prior `CoGroup`.

      To restart an Iterator over a given pipe, this method must be called again.
      Specified by:
        `getIterator` in class `JoinerClosure`
      Parameters:
        `pos` - of type int
      Returns:
        an Iterator of Tuple instances.

    - #### isEmpty

          public boolean isEmpty(int pos)

      Specified by:
        `isEmpty` in class `JoinerClosure`

    - #### makeIterator

          protected java.util.Iterator<Tuple> makeIterator(int pos,
                                               java.util.Iterator values)

    - #### reset

          public void reset(Tuple grouping,
                   java.util.Iterator<Tuple>[] values)

    - #### getGroupTuple

          public Tuple getGroupTuple(Tuple keysTuple)

      Specified by:
        `getGroupTuple` in class `JoinerClosure`

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