You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2016/03/22 15:40:18 UTC

[4/4] ambari git commit: AMBARI-15429. Cannot specify ZooKeeper heap size via UI (vbrodetskiy via dlysnichenko)

AMBARI-15429. Cannot specify ZooKeeper heap size via UI (vbrodetskiy via dlysnichenko)


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

Branch: refs/heads/branch-2.2
Commit: 377a6eaf6664ae42dd0e2ed3ac6245a90bc70476
Parents: c50741a
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Tue Mar 22 16:39:53 2016 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Tue Mar 22 16:39:53 2016 +0200

----------------------------------------------------------------------
 .../internal/BlueprintConfigurationProcessor.java     |  3 +++
 .../3.4.5.2.0/configuration/zookeeper-env.xml         | 14 +++++++++++++-
 .../3.4.5.2.0/package/scripts/params_linux.py         |  5 +++--
 3 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/377a6eaf/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 8a95cb1..bb87b79 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
@@ -2185,6 +2185,7 @@ public class BlueprintConfigurationProcessor {
     Map<String, PropertyUpdater> dbHiveSiteMap = new HashMap<String, PropertyUpdater>();
     Map<String, PropertyUpdater> rangerAdminPropsMap = new HashMap<String, PropertyUpdater>();
     Map<String, PropertyUpdater> hawqSiteMap = new HashMap<String, PropertyUpdater>();
+    Map<String, PropertyUpdater> zookeeperEnvMap = new HashMap<String, PropertyUpdater>();
 
 
 
@@ -2204,6 +2205,7 @@ public class BlueprintConfigurationProcessor {
     singleHostTopologyUpdaters.put("kafka-broker", kafkaBrokerMap);
     singleHostTopologyUpdaters.put("admin-properties", rangerAdminPropsMap);
     singleHostTopologyUpdaters.put("hawq-site", hawqSiteMap);
+    singleHostTopologyUpdaters.put("zookeeper-env", zookeeperEnvMap);
 
     mPropertyUpdaters.put("hadoop-env", hadoopEnvMap);
     mPropertyUpdaters.put("hbase-env", hbaseEnvMap);
@@ -2403,6 +2405,7 @@ public class BlueprintConfigurationProcessor {
     hbaseEnvMap.put("hbase_regionserver_heapsize", new MPropertyUpdater());
     oozieEnvHeapSizeMap.put("oozie_heapsize", new MPropertyUpdater());
     oozieEnvHeapSizeMap.put("oozie_permsize", new MPropertyUpdater());
+    zookeeperEnvMap.put("zk_server_heapsize", new MPropertyUpdater());
 
     // HAWQ
     hawqSiteMap.put("hawq_master_address_host", new SingleHostTopologyUpdater("HAWQMASTER"));

http://git-wip-us.apache.org/repos/asf/ambari/blob/377a6eaf/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/configuration/zookeeper-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/configuration/zookeeper-env.xml b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/configuration/zookeeper-env.xml
index cabdf2c..62e6f27 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/configuration/zookeeper-env.xml
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/configuration/zookeeper-env.xml
@@ -50,7 +50,19 @@
       <overridable>false</overridable>
     </value-attributes>
   </property>
-
+  <property>
+    <name>zk_server_heapsize</name>
+    <value>1024</value>
+    <description>Maximum amount of memory each Zookeeper Server can use.</description>
+    <display-name>Zookeeper Server Maximum Memory</display-name>
+    <value-attributes>
+      <type>int</type>
+      <minimum>256</minimum>
+      <maximum>32768</maximum>
+      <unit>MB</unit>
+      <increment-step>256</increment-step>
+    </value-attributes>
+  </property>
   <property>
     <name>zookeeper_principal_name</name>
     <description>ZooKeeper principal name</description>

http://git-wip-us.apache.org/repos/asf/ambari/blob/377a6eaf/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params_linux.py
index c6264ff..7d52e78 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/params_linux.py
@@ -65,7 +65,8 @@ zk_log_dir = config['configurations']['zookeeper-env']['zk_log_dir']
 zk_data_dir = config['configurations']['zoo.cfg']['dataDir']
 zk_pid_dir = status_params.zk_pid_dir
 zk_pid_file = status_params.zk_pid_file
-zk_server_heapsize = "-Xmx1024m"
+zk_server_heapsize_value = default('configurations/zookeeper-env/zk_server_heapsize', "1024m")
+zk_server_heapsize = format("-Xmx{zk_server_heapsize_value}")
 
 client_port = default('/configurations/zoo.cfg/clientPort', None)
 
@@ -98,4 +99,4 @@ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executab
 if ('zookeeper-log4j' in config['configurations']) and ('content' in config['configurations']['zookeeper-log4j']):
   log4j_props = config['configurations']['zookeeper-log4j']['content']
 else:
-  log4j_props = None
\ No newline at end of file
+  log4j_props = None