use of com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex in project hazelcast-jet by hazelcast.
the class AggregateTransform method addToDagSingleStage.
// --------- ---------
// | source0 | ... | sourceN |
// --------- ---------
// | |
// distributed distributed
// all-to-one all-to-one
// \ /
// ---\ /-----
// v v
// ----------------
// | aggregateP | local parallelism = 1
// ----------------
private void addToDagSingleStage(Planner p) {
PlannerVertex pv = p.addVertex(this, p.uniqueVertexName(name(), ""), 1, aggregateP(aggrOp));
p.addEdges(this, pv.v, edge -> edge.distributed().allToOne());
}
use of com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex in project hazelcast-jet by hazelcast.
the class FlatMapUsingContextTransform method addToDag.
@Override
public void addToDag(Planner p) {
PlannerVertex pv = p.addVertex(this, p.uniqueVertexName(name(), ""), localParallelism(), flatMapUsingContextP(contextFactory, flatMapFn));
p.addEdges(this, pv.v);
}
use of com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex in project hazelcast-jet by hazelcast.
the class GroupTransform method addToDagTwoStage.
// --------- ---------
// | source0 | ... | sourceN |
// --------- ---------
// | |
// local local
// partitioned partitioned
// v v
// --------------------
// | accumulateByKeyP |
// --------------------
// |
// distributed
// partitioned
// v
// ---------------
// | combineByKeyP |
// ---------------
private void addToDagTwoStage(Planner p) {
List<DistributedFunction<?, ? extends K>> groupKeyFns = this.groupKeyFns;
String namePrefix = p.uniqueVertexName(this.name(), "-step");
Vertex v1 = p.dag.newVertex(namePrefix + '1', accumulateByKeyP(groupKeyFns, aggrOp)).localParallelism(localParallelism());
PlannerVertex pv2 = p.addVertex(this, namePrefix + '2', localParallelism(), combineByKeyP(aggrOp, mapToOutputFn));
p.addEdges(this, v1, (e, ord) -> e.partitioned(groupKeyFns.get(ord), HASH_CODE));
p.dag.edge(between(v1, pv2.v).distributed().partitioned(entryKey()));
}
Aggregations