Map<String, Object> hadoopConf = (Map<String, Object>) conf.get("hadoop");
if (hadoopConf == null) {
hadoopConf = new HashMap<String, Object>();
conf.put("hadoop", hadoopConf);
}
ServiceType type = getMapReduceType(blueprint);
Map<String, Object> coreSiteConf = null;
if (type == null || type.equals(ServiceType.MAPRED)) {
coreSiteConf = (Map<String, Object>) hadoopConf.get("mapred-site.xml");
if (coreSiteConf == null) {
coreSiteConf = new HashMap<String, Object>();
hadoopConf.put("mapred-site.xml", coreSiteConf);
}
coreSiteConf.put("mapred.job.tracker",
blueprint.getExternalMapReduce());
}
if (type == null || type.equals(ServiceType.YARN)){
coreSiteConf = (Map<String, Object>) hadoopConf.get("yarn-site.xml");
if (coreSiteConf == null) {
coreSiteConf = new HashMap<String, Object>();
hadoopConf.put("yarn-site.xml", coreSiteConf);
}