use of com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex in project hazelcast-jet by hazelcast.
the class StreamSourceTransform method addToDag.
@Override
public void addToDag(Planner p) {
WatermarkGenerationParams<T> params = emitsJetEvents() ? wmParams : noWatermarks();
if (supportsWatermarks || !emitsJetEvents()) {
p.addVertex(this, p.uniqueVertexName(name(), ""), localParallelism(), metaSupplierFn.apply(params));
} else {
// ------------
// | sourceP |
// ------------
// |
// isolated
// v
// -------------
// | insertWMP |
// -------------
String v1name = p.uniqueVertexName(name(), "");
Vertex v1 = p.dag.newVertex(v1name, metaSupplierFn.apply(params)).localParallelism(localParallelism());
PlannerVertex pv2 = p.addVertex(this, v1name + "-insertWM", localParallelism(), insertWatermarksP(params));
p.dag.edge(between(v1, pv2.v).isolated());
}
}
use of com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex in project hazelcast-jet by hazelcast.
the class TimestampTransform method addToDag.
@Override
public void addToDag(Planner p) {
@SuppressWarnings("unchecked") PlannerVertex pv = p.addVertex(this, p.uniqueVertexName(name(), ""), localParallelism(), insertWatermarksP(wmGenParams));
p.addEdges(this, pv.v);
}
use of com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex in project hazelcast-jet by hazelcast.
the class WindowAggregateTransform method addSessionWindow.
// --------- ---------
// | source0 | ... | sourceN |
// --------- ---------
// | |
// distributed distributed
// all-to-one all-to-one
// \ /
// ---\ /-----
// v v
// ---------------------------
// | aggregateToSessionWindowP | local parallelism = 1
// ---------------------------
private void addSessionWindow(Planner p, SessionWindowDef wDef) {
PlannerVertex pv = p.addVertex(this, p.uniqueVertexName(name(), ""), localParallelism(), aggregateToSessionWindowP(wDef.sessionTimeout(), nCopies(aggrOp.arity(), (DistributedToLongFunction<JetEvent>) JetEvent::timestamp), nCopies(aggrOp.arity(), constantKey()), aggrOp, mapToOutputFn.toKeyedWindowResultFn()));
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 FilterTransform method addToDag.
@Override
public void addToDag(Planner p) {
PlannerVertex pv = p.addVertex(this, p.uniqueVertexName(name(), ""), localParallelism(), filterP(filterFn()));
p.addEdges(this, pv.v);
}
use of com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex in project hazelcast-jet by hazelcast.
the class FilterUsingContextTransform method addToDag.
@Override
public void addToDag(Planner p) {
PlannerVertex pv = p.addVertex(this, p.uniqueVertexName(name(), ""), localParallelism(), filterUsingContextP(contextFactory, filterFn));
p.addEdges(this, pv.v);
}
Aggregations