try {
// construct the plan
FileDataSource source1 = new FileDataSource(new DummyInputFormat(), IN_FILE);
FileDataSource source2 = new FileDataSource(new DummyInputFormat(), IN_FILE);
JoinOperator mat1 = JoinOperator.builder(new DummyMatchStub(), IntValue.class, 0, 0)
.input1(source1)
.input2(source2)
.name("Match 1")
.build();
MapOperator ma1 = MapOperator.builder(new IdentityMap()).input(mat1).name("Map1").build();
ReduceOperator r1 = ReduceOperator.builder(new IdentityReduce(), IntValue.class, 0)
.input(ma1)
.name("Reduce 1")
.build();
ReduceOperator r2 = ReduceOperator.builder(new IdentityReduce(), IntValue.class, 0)
.input(mat1)
.name("Reduce 2")
.build();
MapOperator ma2 = MapOperator.builder(new IdentityMap()).input(mat1).name("Map 2").build();
MapOperator ma3 = MapOperator.builder(new IdentityMap()).input(ma2).name("Map 3").build();
@SuppressWarnings("unchecked")
JoinOperator mat2 = JoinOperator.builder(new DummyMatchStub(), IntValue.class, 0, 0)
.input1(r1, r2, ma2, ma3)
.input2(ma2)
.name("Match 2")
.build();
mat2.setParameter(PactCompiler.HINT_LOCAL_STRATEGY, PactCompiler.HINT_LOCAL_STRATEGY_MERGE);