Преглед на файлове

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

Andrew Onishuk преди 10 години
родител
ревизия
b7799aa935
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java

+ 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");