use of com.hazelcast.jet.stream.impl.processor.SkipP in project hazelcast-jet by hazelcast.
the class SkipPipe method buildDAG.
@Override
public Vertex buildDAG(DAG dag) {
Vertex previous = upstream.buildDAG(dag);
// required final for lambda variable capture
final long skip = this.skip;
Vertex skipVertex = dag.newVertex(uniqueVertexName("skip"), () -> new SkipP(skip)).localParallelism(1);
Edge edge = between(previous, skipVertex);
// if upstream is not ordered, we need to shuffle data to one node
if (!upstream.isOrdered()) {
edge = edge.distributed().allToOne();
}
dag.edge(edge);
return skipVertex;
}