use of com.hazelcast.jet.impl.pipeline.transform.GroupTransform in project hazelcast by hazelcast.
the class GrAggBuilder method buildBatch.
public <A, R, OUT> BatchStage<OUT> buildBatch(@Nonnull AggregateOperation<A, ? extends R> aggrOp, @Nonnull BiFunctionEx<? super K, ? super R, OUT> mapToOutputFn) {
checkSerializable(mapToOutputFn, "mapToOutputFn");
List<Transform> upstreamTransforms = toList(upstreamStages, s -> s.transform);
AbstractTransform transform = new GroupTransform<>(upstreamTransforms, keyFns, aggrOp, mapToOutputFn);
pipelineImpl.connect(upstreamStages, transform);
return new BatchStageImpl<>(transform, pipelineImpl);
}
use of com.hazelcast.jet.impl.pipeline.transform.GroupTransform in project hazelcast-jet by hazelcast.
the class GrAggBuilder method buildBatch.
@SuppressWarnings("unchecked")
public <A, R, OUT> BatchStage<OUT> buildBatch(@Nonnull AggregateOperation<A, ? extends R> aggrOp, @Nonnull DistributedBiFunction<? super K, ? super R, OUT> mapToOutputFn) {
List<Transform> upstreamTransforms = upstreamStages.stream().map(s -> s.transform).collect(toList());
Transform transform = new GroupTransform<>(upstreamTransforms, keyFns, aggrOp, mapToOutputFn);
pipelineImpl.connect(upstreamTransforms, transform);
return new BatchStageImpl<>(transform, pipelineImpl);
}
Aggregations