cascading.flow.hadoop

## Class HadoopCoGroupClosure

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

Direct Known Subclasses:
  TezCoGroupClosure

    public class HadoopCoGroupClosure
    extends HadoopGroupByClosure

Class CoGroupClosure is used internally to represent co-grouping results of multiple tuple streams.

### Nested Class Summary

Nested Classes
`static class` `HadoopCoGroupClosure.Spill`

### Field Summary

Fields
`protected java.util.Collection<Tuple>[]` `collections` Field groups
`protected int` `numSelfJoins`

### Fields inherited from class cascading.flow.hadoop.HadoopGroupByClosure

`grouping, values`

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

`flowProcess, joinFields, valueFields`

### Constructor Summary

Constructors
Constructor and Description
`HadoopCoGroupClosure(FlowProcess flowProcess, int numSelfJoins, Fields[] groupingFields, Fields[] valueFields)`

### Method Summary

Methods
`protected void` `build()`
`protected void` `clearGroups()`
`java.util.Iterator<Tuple>` `createIterator(IndexTuple current, java.util.Iterator<IndexTuple> values)`
`protected java.util.Collection<Tuple>` `createTupleCollection(Fields joinField)`
`Tuple` `getGroupTuple(Tuple keysTuple)`
`java.util.Iterator<Tuple>` `getIterator(int pos)`
`protected void` `initLists()`
`boolean` `isEmpty(int pos)`
`void` `reset(Tuple grouping, java.util.Iterator<Tuple>[] values)`
`int` `size()`

### Methods inherited from class cascading.flow.hadoop.HadoopGroupByClosure

`getGrouping, getValueIterator, makeIterator`

### 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

#### collections

    protected java.util.Collection<Tuple>[] collections

Field groups

#### numSelfJoins

    protected final int numSelfJoins

### Constructor Detail

#### HadoopCoGroupClosure

    public HadoopCoGroupClosure(FlowProcess flowProcess,
                        int numSelfJoins,
                        Fields[] groupingFields,
                        Fields[] valueFields)

### Method Detail

#### size

    public int size()

Overrides:
  `size` in class `HadoopGroupByClosure`

#### getIterator

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

Overrides:
  `getIterator` in class `HadoopGroupByClosure`

#### getGroupTuple

    public Tuple getGroupTuple(Tuple keysTuple)

Overrides:
  `getGroupTuple` in class `HadoopGroupByClosure`

#### isEmpty

    public boolean isEmpty(int pos)

Overrides:
  `isEmpty` in class `HadoopGroupByClosure`

#### reset

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

Overrides:
  `reset` in class `HadoopGroupByClosure`

#### build

    protected void build()

#### clearGroups

    protected void clearGroups()

#### initLists

    protected void initLists()

#### createTupleCollection

    protected java.util.Collection<Tuple> createTupleCollection(Fields joinField)

#### createIterator

    public java.util.Iterator<Tuple> createIterator(IndexTuple current,
                                           java.util.Iterator<IndexTuple> values)