Search in sources :

Example 1 with CombineP

use of com.hazelcast.jet.stream.impl.processor.CombineP in project hazelcast-jet by hazelcast.

the class Reducers method buildCombiner.

private static <T> Vertex buildCombiner(DAG dag, Vertex accumulate, BinaryOperator<T> combiner) {
    DistributedSupplier<Processor> supplier = () -> new CombineP<>(combiner);
    Vertex combine = dag.newVertex("combine", supplier).localParallelism(1);
    dag.edge(between(accumulate, combine).distributed().allToOne());
    return combine;
}
Also used : Vertex(com.hazelcast.jet.core.Vertex) Processor(com.hazelcast.jet.core.Processor) CombineP(com.hazelcast.jet.stream.impl.processor.CombineP)

Aggregations

Processor (com.hazelcast.jet.core.Processor)1 Vertex (com.hazelcast.jet.core.Vertex)1 CombineP (com.hazelcast.jet.stream.impl.processor.CombineP)1