瀏覽代碼

AMBARI-6258. Ambari server upgrade fails if oozie, hive or hbase services are missing (aonishuk)

Andrew Onishuk 11 年之前
父節點
當前提交
f95a23cf4c

+ 5 - 0
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java

@@ -192,6 +192,11 @@ public abstract class AbstractUpgradeCatalog implements UpgradeCatalog {
     if (clusterMap != null && !clusterMap.isEmpty()) {
       for (Cluster cluster : clusterMap.values()) {
         Config oldConfig = cluster.getDesiredConfigByType(configType);
+        if (oldConfig == null) {
+          LOG.info("Config " + configType + " not found. Assuming service not installed. " +
+              "Skipping configuration properties update");
+          return;
+        }
 
         if (properties != null) {
           Map<String, Config> all = cluster.getConfigsByType(configType);