Bladeren bron

AMBARI-8098. Upgrade to 1.7.0 fails if Oozie was not installed with NPE (aonishuk)

Andrew Onishuk 10 jaren geleden
bovenliggende
commit
b7799aa935

+ 2 - 1
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java

@@ -1076,7 +1076,8 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
           }
 
           //oozie_heapsize is added for HDP2, we should check if it exists and not add it for HDP1
-          if(cluster.getDesiredConfigByType("oozie-env").getProperties().containsKey("oozie_heapsize")) {
+          if(cluster.getDesiredConfigByType("oozie-env") != null &&
+              cluster.getDesiredConfigByType("oozie-env").getProperties().containsKey("oozie_heapsize")) {
             Map<String, String> oozieProps = new HashMap<String, String>();
             oozieProps.put("oozie_heapsize","2048m");
             oozieProps.put("oozie_permsize","256m");