}
StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironment(2)
.setBufferTimeout(1);
IterativeDataStream<Tuple2<Double, Integer>> it = env.fromCollection(input).iterate()
.setMaxWaitTime(3000);
SplitDataStream<Tuple2<Double,Integer>> step = it.map(new Step()).shuffle().setParallelism(2).split(new MySelector());
it.closeWith(step.select("iterate"));