Search in sources :

Example 1 with ConstantFunctionEx

use of com.hazelcast.jet.impl.util.ConstantFunctionEx in project hazelcast by hazelcast.

the class GlobalMapStatefulTransform method addToDag.

@Override
public void addToDag(Planner p, Context context) {
    determinedLocalParallelism(1);
    ConstantFunctionEx<T, Integer> keyFn = new ConstantFunctionEx<>(name().hashCode());
    PlannerVertex pv = p.addVertex(this, name(), determinedLocalParallelism(), mapStatefulP(Long.MAX_VALUE, keyFn, timestampFn, createFn, statefulMapFn, null));
    p.addEdges(this, pv.v, edge -> edge.partitioned(keyFn).distributed());
}
Also used : PlannerVertex(com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex) ConstantFunctionEx(com.hazelcast.jet.impl.util.ConstantFunctionEx)

Example 2 with ConstantFunctionEx

use of com.hazelcast.jet.impl.util.ConstantFunctionEx in project hazelcast by hazelcast.

the class GlobalFlatMapStatefulTransform method addToDag.

@Override
public void addToDag(Planner p, Context context) {
    determinedLocalParallelism(1);
    ConstantFunctionEx<T, Integer> keyFn = new ConstantFunctionEx<>(name().hashCode());
    PlannerVertex pv = p.addVertex(this, name(), determinedLocalParallelism(), flatMapStatefulP(Long.MAX_VALUE, keyFn, timestampFn, createFn, statefulFlatMapFn, null));
    p.addEdges(this, pv.v, edge -> edge.partitioned(keyFn).distributed());
}
Also used : PlannerVertex(com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex) ConstantFunctionEx(com.hazelcast.jet.impl.util.ConstantFunctionEx)

Aggregations

PlannerVertex (com.hazelcast.jet.impl.pipeline.Planner.PlannerVertex)2 ConstantFunctionEx (com.hazelcast.jet.impl.util.ConstantFunctionEx)2