MapOperator map1 = MapOperator.builder(new IdentityMap()).name("Map1").build();
map1.setDegreeOfParallelism(degOfPar);
map1.setInput(source);
ReduceOperator reduce1 = ReduceOperator.builder(new IdentityReduce(), IntValue.class, 0).name("Reduce 1").build();
reduce1.setDegreeOfParallelism(degOfPar);
reduce1.setInput(map1);
MapOperator map2 = MapOperator.builder(new IdentityMap()).name("Map2").build();
map2.setDegreeOfParallelism(degOfPar * 2);
map2.setInput(reduce1);
ReduceOperator reduce2 = ReduceOperator.builder(new IdentityReduce(), IntValue.class, 0).name("Reduce 2").build();
reduce2.setDegreeOfParallelism(degOfPar * 2);
reduce2.setInput(map2);
FileDataSink sink = new FileDataSink(new DummyOutputFormat(), OUT_FILE, "Sink");
sink.setDegreeOfParallelism(degOfPar * 2);