}
if ((script == null || script.length() == 0) && (ps != null)) {
script = StringUtils.join(ps.getScriptCache(), '\n');
}
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));