You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2015/04/29 00:03:40 UTC

ambari git commit: AMBARI-10807. hbase_master_heapsize should be capped at host's memory (srimanth)

Repository: ambari
Updated Branches:
  refs/heads/trunk c9fdccd96 -> 2cf8030e3


AMBARI-10807. hbase_master_heapsize should be capped at host's memory (srimanth)


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

Branch: refs/heads/trunk
Commit: 2cf8030e3728005426925417f12f9bca4c8b3b80
Parents: c9fdccd
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Tue Apr 28 14:50:53 2015 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Tue Apr 28 15:03:25 2015 -0700

----------------------------------------------------------------------
 .../stacks/HDP/2.2/services/stack_advisor.py    |  5 +++
 .../stacks/2.2/common/test_stack_advisor.py     | 33 ++++++++++++++++++++
 ambari-web/app/data/HDP2/site_properties.js     |  2 +-
 3 files changed, 39 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2cf8030e/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 3ea58d5..3700a2d 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -353,6 +353,11 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
     super(HDP22StackAdvisor, self).recommendHbaseEnvConfigurations(configurations, clusterData, services, hosts)
     putHbaseEnvPropertyAttributes = self.putPropertyAttribute(configurations, "hbase-env")
 
+    hmaster_host = self.getHostWithComponent("HBASE", "HBASE_MASTER", services, hosts)
+    if hmaster_host is not None:
+      host_ram = hmaster_host["Hosts"]["total_mem"]
+      putHbaseEnvPropertyAttributes('hbase_master_heapsize', 'maximum', max(1024, int(host_ram/1024)))
+
     rs_hosts = self.getHostsWithComponent("HBASE", "HBASE_REGIONSERVER", services, hosts)
     if rs_hosts is not None and len(rs_hosts) > 0:
       min_ram = rs_hosts[0]["Hosts"]["total_mem"]

http://git-wip-us.apache.org/repos/asf/ambari/blob/2cf8030e/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index cfab581..1253781 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -1437,6 +1437,39 @@ class TestHDP22StackAdvisor(TestCase):
     self.stackAdvisor.recommendHBASEConfigurations(configurations, clusterData, services, None)
     self.assertEquals(configurations, expected)
 
+    # Test hbase_master_heapsize maximum
+    hosts['items'][0]['Hosts']['host_name'] = 'host1'
+    services['services'].append({"StackServices":
+                          {"service_name" : "HBASE",
+                           "service_version" : "2.6.0.2.2"
+                           },
+                      "components":[
+                        {
+                          "href":"/api/v1/stacks/HDP/versions/2.2/services/HBASE/components/HBASE_MASTER",
+                          "StackServiceComponents":{
+                            "advertise_version":"true",
+                            "cardinality":"1+",
+                            "component_name":"HBASE_MASTER",
+                            "custom_commands":[],
+                            "display_name":"DataNode",
+                            "is_client":"false",
+                            "is_master":"false",
+                            "service_name":"HBASE",
+                            "stack_name":"HDP",
+                            "stack_version":"2.2",
+                            "hostnames":[
+                              "host1"
+                            ]
+                          },
+                          "dependencies":[]
+                        }]})
+    services['configurations']['hbase-env']['properties']['phoenix_sql_enabled'] = 'false'
+    expected['hbase-site']['properties']['hbase.regionserver.wal.codec'] = 'org.apache.hadoop.hbase.regionserver.wal.WALCellCodec'
+    expected['hbase-site']['property_attributes'] = {'hbase.regionserver.rpc.scheduler.factory.class': {'delete': 'true'}, 'hbase.rpc.controllerfactory.class': {'delete': 'true'}}
+    expected['hbase-env']['property_attributes'] = {'hbase_master_heapsize': {'maximum': '49152'}}
+    self.stackAdvisor.recommendHBASEConfigurations(configurations, clusterData, services, hosts)
+    self.assertEquals(configurations, expected)
+
 
   def test_recommendHDFSConfigurations(self):
     configurations = {

http://git-wip-us.apache.org/repos/asf/ambari/blob/2cf8030e/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index f31d826..274b673 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -743,7 +743,7 @@ var hdp2properties = [
   {
     "id": "site property",
     "name": "hbase.hregion.majorcompaction",
-    "displayName": "HBase Region Major Compaction",
+    "displayName": "HBase Region Major Compaction Interval",
     "displayType": "int",
     "unit": "ms",
     "category": "HBASE_REGIONSERVER",