ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject ambari git commit: AMBARI-17793: Blueprint deployment throwing NPE when there is a config marked as deleted (jluniya)
Date Tue, 19 Jul 2016 23:06:09 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 19b02fa79 -> f6395faa6


AMBARI-17793: Blueprint deployment throwing NPE when there is a config marked as deleted (jluniya)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f6395faa
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f6395faa
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f6395faa

Branch: refs/heads/branch-2.4
Commit: f6395faa6c80ca299928152cf57e2f93dbbbc1c3
Parents: 19b02fa
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Tue Jul 19 16:04:48 2016 -0700
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Tue Jul 19 16:05:54 2016 -0700

----------------------------------------------------------------------
 .../controller/internal/BlueprintConfigurationProcessor.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f6395faa/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index 36cea56..a295bf7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -215,7 +215,7 @@ public class BlueprintConfigurationProcessor {
           // cluster scoped configuration which also includes all default and BP properties
           Map<String, Map<String, String>> clusterProps = clusterTopology.getConfiguration().getFullProperties();
           Map<String, String> typeMap = clusterProps.get(type);
-          if (typeMap != null && typeMap.containsKey(propertyName)) {
+          if (typeMap != null && typeMap.containsKey(propertyName) && typeMap.get(propertyName)
!= null) {
             requiredHostGroups.addAll(updater.getRequiredHostGroups(
                 propertyName, typeMap.get(propertyName), clusterProps, clusterTopology));
           }
@@ -266,7 +266,7 @@ public class BlueprintConfigurationProcessor {
 
           // topo cluster scoped configuration which also includes all default and BP properties
           Map<String, String> typeMap = clusterProps.get(type);
-          if (typeMap != null && typeMap.containsKey(propertyName)) {
+          if (typeMap != null && typeMap.containsKey(propertyName) && typeMap.get(propertyName)
!= null) {
             final String originalValue = typeMap.get(propertyName);
             final String updatedValue =
               updater.updateForClusterCreate(propertyName, originalValue, clusterProps, clusterTopology);


Mime
View raw message