K- the type of the grouping key
E0- the type of item in stream-0
public class CoGroupBuilder<K,E0> extends Object
stage.coGroupBuilder()on the stage that will become the zero-indexed contributor to the co-grouping operation.
This object is primarily intended to build a co-grouping of four or more
stages; for up to three stages the direct
calls should be preferred because they offer more static type safety.
|Modifier and Type||Method and Description|
Adds another contributing pipeline stage to the co-grouping operation.
Builds a new pipeline stage that performs the co-grouping operation.
Returns the tag referring to the 0-indexed contributing pipeline stage, the one from which this builder was obtained.
public <E> Tag<E> add(ComputeStage<E> stage, DistributedFunction<? super E,K> groupKeyFn)
E- type of items on the pipeline stage
stage- the pipeline stage to be co-grouped
groupKeyFn- a function that will extract the key from the data items of the pipeline stage
public <A,R> ComputeStage<Tuple2<K,R>> build(AggregateOperation<A,R> aggrOp)
A- the type of the accumulator in the aggregate operation
R- the type of the result of aggregation
aggrOp- the aggregate operation to perform on the co-grouped items
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.