// Finally, construct the jobs from the prototypes and return.
DotfileWriter dotfileWriter = new DotfileWriter();
MRExecutor exec = new MRExecutor(conf, jarClass, outputs, toMaterialize, pipelineCallables);
for (JobPrototype proto : Sets.newHashSet(assignments.values())) {
dotfileWriter.addJobPrototype(proto);
exec.addJob(proto.getCrunchJob(jarClass, conf, pipeline, lastJobID));
}
String planDotFile = dotfileWriter.buildDotfile();
exec.setPlanDotFile(planDotFile);
conf.set(PlanningParameters.PIPELINE_PLAN_DOTFILE, planDotFile);