ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-21582 - Stack Tools and Feature Should be Ignored in Blueprints (jonathanhurley)
Date Wed, 26 Jul 2017 20:39:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 187c91511 -> 84317d92c


AMBARI-21582 - Stack Tools and Feature Should be Ignored in Blueprints (jonathanhurley)


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

Branch: refs/heads/branch-2.5
Commit: 84317d92c989d17ae9bc179d859cf53a244ce78b
Parents: 187c915
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Wed Jul 26 16:29:47 2017 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Wed Jul 26 16:35:54 2017 -0400

----------------------------------------------------------------------
 .../controller/internal/BlueprintConfigurationProcessor.java      | 2 +-
 .../controller/internal/BlueprintConfigurationProcessorTest.java  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/84317d92/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 50cea9e..b0a605b 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
@@ -2960,7 +2960,7 @@ public class BlueprintConfigurationProcessor {
       Map<String,String> clusterEnvDefaultProperties = defaultStackProperties.get(CLUSTER_ENV_CONFIG_TYPE_NAME);
 
       for( String property : properties ){
-        if (defaultStackProperties.containsKey(property)) {
+        if (clusterEnvDefaultProperties.containsKey(property)) {
           configuration.setProperty(CLUSTER_ENV_CONFIG_TYPE_NAME, property,
               clusterEnvDefaultProperties.get(property));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/84317d92/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index 3562c96..c5af0d9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -87,6 +87,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport
{
   private static final Configuration EMPTY_CONFIG = new Configuration(Collections.<String,
Map<String, String>>emptyMap(), Collections.<String, Map<String, Map<String,
String>>>emptyMap());
   private final Map<String, Collection<String>> serviceComponents = new HashMap<>();
   private final Map<String, Map<String, String>> stackProperties = new HashMap<>();
+  private final Map<String, String> defaultClusterEnvProperties = new HashMap<>();
 
   private final String STACK_NAME = "testStack";
   private final String STACK_VERSION = "1";
@@ -212,6 +213,8 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport
{
     expect(ambariContext.getConfigHelper()).andReturn(configHelper).anyTimes();
     expect(configHelper.getDefaultStackProperties(
         EasyMock.eq(new StackId(STACK_NAME, STACK_VERSION)))).andReturn(stackProperties).anyTimes();
+
+    stackProperties.put(ConfigHelper.CLUSTER_ENV, defaultClusterEnvProperties);
   }
 
   @After


Mime
View raw message