}
MRPlanCalculator opPlan = new MRPlanCalculator(opPlanGenerator.getP2jPlan(), plan, p2lMap, opPlanGenerator.getReverseMap());
MRPlanCalculator unopPlan = new MRPlanCalculator(unopPlanGenerator.getP2jPlan(), plan, p2lMap, unopPlanGenerator.getReverseMap());
P2jPlanPackage plans = new P2jPlanPackage(opPlan.getP2jPlan(), unopPlan.getP2jPlan(), script, planId);
Properties props = context.getProperties();
plans.setUserName(UserGroupInformation.getCurrentUser().getUserName());
if (props.containsKey(JOB_NAME_PROP)) {
plans.setJobName(props.getProperty(JOB_NAME_PROP));
} else {
plans.setJobName("unknown");
}
if(props.containsKey(ENABLE_SAMPLE_OUTPUT_PROP)) {
String strProp = props.getProperty(ENABLE_SAMPLE_OUTPUT_PROP).toLowerCase();
if(strProp.equals("f") || strProp.equals("false")) {
enableSampleOutput = false;
LOG.warn("Sample Output has been disabled.");
}
}
plans.getStatus().setStartTime();
plans.getStatus().setStatusText(StatusText.running);
invalidClient = (psClient.savePlan(plans) == null);
} catch (Exception e) {
LOG.error("Caught unexpected exception generating json plan.", e);
invalidClient = true;