Class WindowGroupAggregateBuilder1<T0,K>

java.lang.Object
com.hazelcast.jet.pipeline.WindowGroupAggregateBuilder1<T0,K>
Type Parameters:
T0 - the type of the stream-0 item
K - type of the key

public class WindowGroupAggregateBuilder1<T0,K> extends Object
Offers a step-by-step API to build a pipeline stage that performs a windowed co-grouping and aggregation of the data from several input stages. To obtain it, call StageWithKeyAndWindow.aggregateBuilder() on one of the stages to co-aggregate and refer to that method's Javadoc for further details.

This object is mainly intended to build a co-aggregation of four or more contributing stages. For up to three stages, prefer the direct stage.aggregateN(...) calls because they offer more static type safety.

Note: this is not a builder of AggregateOperation. If that' s what you are looking for, go here.

Since:
Jet 3.0
  • Method Details

    • tag0

      @Nonnull public Tag<T0> tag0()
      Returns the tag corresponding to the pipeline stage this builder was obtained from. Use this tag to refer to this stage when building the AggregateOperation that you'll pass to build(aggrOp).
    • add

      @Nonnull public <T> Tag<T> add(@Nonnull StreamStageWithKey<T,K> stage)
      Adds another stage that will contribute its data to the windowed group-and-aggregate stage being constructed. Returns the tag you'll use to refer to this stage when building the AggregateOperation that you'll pass to build().
    • build

      @Nonnull public <R> StreamStage<KeyedWindowResult<K,R>> build(@Nonnull AggregateOperation<?,? extends R> aggrOp)
      Creates and returns a pipeline stage that performs a windowed cogroup-and-aggregate of the pipeline stages registered with this builder object. The tags you register with the aggregate operation must match the tags you registered with this builder.
      Type Parameters:
      R - the type of the aggregation result
      Parameters:
      aggrOp - the aggregate operation to perform
      Returns:
      a new stage representing the co-aggregation
      See Also: