K
- the type of the grouping keyE0
- the type of item in stream-0public 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 stage.coGroup(...)
calls should be preferred because they offer more static type safety.
Modifier and Type | Method and Description |
---|---|
<E> Tag<E> |
add(ComputeStage<E> stage,
DistributedFunction<? super E,K> groupKeyFn)
Adds another contributing pipeline stage to the co-grouping operation.
|
<A,R> ComputeStage<Tuple2<K,R>> |
build(AggregateOperation<A,R> aggrOp)
Builds a new pipeline stage that performs the co-grouping operation.
|
Tag<E0> |
tag0()
Returns the tag referring to the 0-indexed contributing pipeline
stage, the one from which this builder was obtained.
|
public Tag<E0> tag0()
public <E> Tag<E> add(ComputeStage<E> stage, DistributedFunction<? super E,K> groupKeyFn)
E
- type of items on the pipeline stagestage
- the pipeline stage to be co-groupedgroupKeyFn
- a function that will extract the key from the data items of the
pipeline stagepublic <A,R> ComputeStage<Tuple2<K,R>> build(AggregateOperation<A,R> aggrOp)
A
- the type of the accumulator in the aggregate operationR
- the type of the result of aggregationaggrOp
- the aggregate operation to perform on the co-grouped itemsCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.