JarFileCreator jfc = new JarFileCreator(jarFile);
jfc.addClass(UnionTask.class);
jfc.createJarFile();
// Create job graph
final JobGraph jg = new JobGraph("Job with large DoP (" + numberOfSubtasks + ")");
// input vertex 1
final JobFileInputVertex i1 = new JobFileInputVertex("Input 1", jg);
i1.setFileInputClass(FileLineReader.class);
i1.setFilePath(new Path(inputFile1.toURI()));
i1.setNumberOfSubtasks(numberOfSubtasks);
i1.setNumberOfSubtasksPerInstance(numberOfSubtasks);
// input vertex 2
final JobFileInputVertex i2 = new JobFileInputVertex("Input 2", jg);
i2.setFileInputClass(FileLineReader.class);
i2.setFilePath(new Path(inputFile2.toURI()));
i2.setNumberOfSubtasks(numberOfSubtasks);
i2.setNumberOfSubtasksPerInstance(numberOfSubtasks);
// union task
final JobTaskVertex f1 = new JobTaskVertex("Forward 1", jg);
f1.setTaskClass(DoubleTargetTask.class);
f1.setNumberOfSubtasks(numberOfSubtasks);
f1.setNumberOfSubtasksPerInstance(numberOfSubtasks);
// output vertex
JobFileOutputVertex o1 = new JobFileOutputVertex("Output", jg);
o1.setFileOutputClass(FileLineWriter.class);
o1.setFilePath(new Path(outputFile.toURI()));
o1.setNumberOfSubtasks(numberOfSubtasks);
o1.setNumberOfSubtasksPerInstance(numberOfSubtasks);
i1.setVertexToShareInstancesWith(o1);
i2.setVertexToShareInstancesWith(o1);
f1.setVertexToShareInstancesWith(o1);
// connect vertices
i1.connectTo(f1, ChannelType.NETWORK, DistributionPattern.BIPARTITE);
i2.connectTo(f1, ChannelType.NETWORK, DistributionPattern.BIPARTITE);
f1.connectTo(o1, ChannelType.NETWORK, DistributionPattern.BIPARTITE);
// add jar
jg.addJar(new Path(jarFile.toURI()));
// Create job client and launch job
jobClient = new JobClient(jg, configuration);
// disable logging for the taskmanager and the client, as they will have many