Repository: ambari Updated Branches: refs/heads/trunk ffe4fdbfc -> 6e5e984b6
AMBARI-11894. Blueprint export incorrectly removes Oozie heapsize settings from exported Blueprint. (rnettleton) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6e5e984b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6e5e984b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6e5e984b Branch: refs/heads/trunk Commit: 6e5e984b66ad3dd3445e85ca82507daecad43c99 Parents: ffe4fdb Author: Bob Nettleton <rnettle...@hortonworks.com> Authored: Fri Jun 12 22:08:05 2015 -0400 Committer: Bob Nettleton <rnettle...@hortonworks.com> Committed: Fri Jun 12 22:08:47 2015 -0400 ---------------------------------------------------------------------- .../internal/BlueprintConfigurationProcessor.java | 6 ++++-- .../internal/BlueprintConfigurationProcessorTest.java | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6e5e984b/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 af14529..9d49714 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 @@ -1833,6 +1833,7 @@ public class BlueprintConfigurationProcessor { Map<String, PropertyUpdater> hbaseEnvMap = new HashMap<String, PropertyUpdater>(); Map<String, PropertyUpdater> hiveEnvMap = new HashMap<String, PropertyUpdater>(); Map<String, PropertyUpdater> oozieEnvMap = new HashMap<String, PropertyUpdater>(); + Map<String, PropertyUpdater> oozieEnvHeapSizeMap = new HashMap<String, PropertyUpdater>(); Map<String, PropertyUpdater> oozieEnvOriginalValueMap = new HashMap<String, PropertyUpdater>(); Map<String, PropertyUpdater> multiWebhcatSiteMap = new HashMap<String, PropertyUpdater>(); Map<String, PropertyUpdater> multiHbaseSiteMap = new HashMap<String, PropertyUpdater>(); @@ -1865,6 +1866,7 @@ public class BlueprintConfigurationProcessor { mPropertyUpdaters.put("hadoop-env", hadoopEnvMap); mPropertyUpdaters.put("hbase-env", hbaseEnvMap); mPropertyUpdaters.put("mapred-env", mapredEnvMap); + mPropertyUpdaters.put("oozie-env", oozieEnvHeapSizeMap); multiHostTopologyUpdaters.put("webhcat-site", multiWebhcatSiteMap); multiHostTopologyUpdaters.put("hbase-site", multiHbaseSiteMap); @@ -2003,8 +2005,8 @@ public class BlueprintConfigurationProcessor { mapredEnvMap.put("jtnode_heapsize", new MPropertyUpdater()); hbaseEnvMap.put("hbase_master_heapsize", new MPropertyUpdater()); hbaseEnvMap.put("hbase_regionserver_heapsize", new MPropertyUpdater()); - oozieEnvMap.put("oozie_heapsize", new MPropertyUpdater()); - oozieEnvMap.put("oozie_permsize", new MPropertyUpdater()); + oozieEnvHeapSizeMap.put("oozie_heapsize", new MPropertyUpdater()); + oozieEnvHeapSizeMap.put("oozie_permsize", new MPropertyUpdater()); } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/6e5e984b/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 fc6ec4b..a0c29e8 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 @@ -1345,6 +1345,8 @@ public class BlueprintConfigurationProcessorTest { oozieEnvProperties.put("oozie_hostname", expectedHostName); oozieEnvProperties.put("oozie_existing_mysql_host", expectedExternalHost); + oozieEnvProperties.put("oozie_heapsize", "1024m"); + oozieEnvProperties.put("oozie_permsize", "2048m"); coreSiteProperties.put("hadoop.proxyuser.oozie.hosts", expectedHostName + "," + expectedHostNameTwo); @@ -1394,6 +1396,13 @@ public class BlueprintConfigurationProcessorTest { oozieEnvProperties.containsKey("oozie_existing_mysql_host")); assertFalse("oozie.service.JPAService.jdbc.url should not have been present in the exported configuration", oozieSiteProperties.containsKey("oozie.service.JPAService.jdbc.url")); + + // verify that oozie-env heapsize properties are not removed from the configuration + assertEquals("oozie_heapsize should have been included in exported configuration", + "1024m", oozieEnvProperties.get("oozie_heapsize")); + assertEquals("oozie_permsize should have been included in exported configuration", + "2048m", oozieEnvProperties.get("oozie_permsize")); + } @Test