TaskConfig t = new TaskConfig(tic.getContainingVertex().getConfiguration());
t.addChainedTask(tic.getChainedTask(), tic.getTaskConfig(), tic.getTaskName());
}
// create the jobgraph object
JobGraph graph = new JobGraph(program.getJobName());
graph.setNumberOfExecutionRetries(program.getOriginalPactPlan().getNumberOfExecutionRetries());
graph.setAllowQueuedScheduling(false);
// add vertices to the graph
for (AbstractJobVertex vertex : this.vertices.values()) {
graph.addVertex(vertex);
}
for (AbstractJobVertex vertex : this.auxVertices) {
graph.addVertex(vertex);
vertex.setSlotSharingGroup(sharingGroup);
}
// add registered cache file into job configuration
for (Entry<String, DistributedCacheEntry> e : program.getOriginalPactPlan().getCachedFiles()) {
DistributedCache.writeFileInfoToConfig(e.getKey(), e.getValue(), graph.getJobConfiguration());
}
// release all references again
this.vertices = null;
this.chainedTasks = null;