ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-13119 Unit tests for split points finder (dsen)
Date Thu, 17 Sep 2015 18:36:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f438b28c2 -> 0f746256a


AMBARI-13119 Unit tests for split points finder (dsen)


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

Branch: refs/heads/trunk
Commit: 0f746256a0a73ab8aaa6f3d425f463befa03f58d
Parents: f438b28
Author: Dmytro Sen <dsen@apache.org>
Authored: Thu Sep 17 21:35:50 2015 +0300
Committer: Dmytro Sen <dsen@apache.org>
Committed: Thu Sep 17 21:35:50 2015 +0300

----------------------------------------------------------------------
 .../stacks/2.2/common/test_stack_advisor.py     | 68 ++++++++++++++++++++
 1 file changed, 68 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f746256/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 2908d8f..5bb99ae 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
@@ -2110,6 +2110,74 @@ class TestHDP22StackAdvisor(TestCase):
     self.stackAdvisor.recommendAmsConfigurations(configurations, clusterData, services, hosts)
     self.assertEquals(configurations, expected)
 
+    # Test splitpoints, AMS embedded mode
+    services['changed-configurations'] = [
+      {
+        "type": "ams-hbase-env",
+        "name": "hbase_master_heapsize"
+      }
+    ]
+
+    services['configurations'] = {
+      'ams-hbase-site': {'properties': {}},
+      'ams-hbase-env': {'properties': {}}
+    }
+
+    # Embedded mode, 512m master heapsize, no splitpoints recommended
+    services["configurations"]['ams-hbase-env']['properties']['hbase_master_heapsize'] =
'512m'
+    services["configurations"]['ams-hbase-site']['properties']['hbase.regionserver.global.memstore.lowerLimit']
= '0.3'
+    services["configurations"]['ams-hbase-site']['properties']['hbase.hregion.memstore.flush.size']
= '134217728'
+
+    expected['ams-site']['properties']['timeline.metrics.host.aggregate.splitpoints'] = '
'
+    expected['ams-site']['properties']['timeline.metrics.cluster.aggregate.splitpoints']
= ' '
+    expected['ams-hbase-env']['properties']['hbase_master_heapsize'] = '512m'
+
+    self.stackAdvisor.recommendAmsConfigurations(configurations, clusterData, services, hosts)
+    self.assertEquals(configurations, expected)
+
+    # Embedded mode, 4096m master heapsize, some splitpoints recommended
+    services["configurations"]['ams-hbase-env']['properties']['hbase_master_heapsize'] =
'4096m'
+    expected['ams-site']['properties']['timeline.metrics.host.aggregate.splitpoints'] = \
+      'jvm.JvmMetrics.MemHeapCommittedM,regionserver.Server.Increment_median'
+    expected['ams-site']['properties']['timeline.metrics.cluster.aggregate.splitpoints']
= ' '
+    expected['ams-hbase-env']['properties']['hbase_master_heapsize'] = '4096m'
+    self.stackAdvisor.recommendAmsConfigurations(configurations, clusterData, services, hosts)
+    self.assertEquals(configurations, expected)
+
+    # Embedded mode, 8192m master heapsize, more splitpoints recommended
+    services["configurations"]['ams-hbase-env']['properties']['hbase_master_heapsize'] =
'8192m'
+    expected['ams-hbase-env']['properties']['hbase_master_heapsize'] = '8192m'
+    self.stackAdvisor.recommendAmsConfigurations(configurations, clusterData, services, hosts)
+    self.assertEquals(len(configurations['ams-site']['properties']['timeline.metrics.host.aggregate.splitpoints'].split(',')),
10)
+    self.assertEquals(len(configurations['ams-site']['properties']['timeline.metrics.cluster.aggregate.splitpoints'].split(',')),
2)
+
+    # Test splitpoints, AMS distributed mode
+    services['changed-configurations'] = [
+      {
+        "type": "ams-hbase-env",
+        "name": "hbase_regionserver_heapsize"
+      }
+    ]
+    services["configurations"]['ams-hbase-site']['properties']['hbase.rootdir'] = 'hdfs://host1/amshbase'
+    expected['ams-hbase-site']['properties']['hbase.rootdir'] = 'hdfs://host1/amshbase'
+    expected['ams-hbase-env']['properties']['hbase_master_heapsize'] = '512m'
+
+    # Distributed mode, low memory, no splitpoints recommended
+    services["configurations"]['ams-hbase-env']['properties']['hbase_regionserver_heapsize']
= '512m'
+    expected['ams-site']['properties']['timeline.metrics.host.aggregate.splitpoints'] = '
'
+    expected['ams-site']['properties']['timeline.metrics.cluster.aggregate.splitpoints']
= ' '
+    expected['ams-hbase-env']['properties']['hbase_regionserver_heapsize'] = '512m'
+    expected['ams-hbase-env']['properties']['regionserver_xmn_size'] = '256m'
+    self.stackAdvisor.recommendAmsConfigurations(configurations, clusterData, services, hosts)
+    self.assertEquals(configurations, expected)
+
+    # Distributed mode, more memory, more splitpoints recommended
+    services["configurations"]['ams-hbase-env']['properties']['hbase_regionserver_heapsize']
= '8192m'
+    expected['ams-hbase-env']['properties']['hbase_regionserver_heapsize'] = '8192m'
+    self.stackAdvisor.recommendAmsConfigurations(configurations, clusterData, services, hosts)
+    self.assertEquals(len(configurations['ams-site']['properties']['timeline.metrics.host.aggregate.splitpoints'].split(',')),
10)
+    self.assertEquals(len(configurations['ams-site']['properties']['timeline.metrics.cluster.aggregate.splitpoints'].split(',')),
2)
+
   def test_recommendHbaseConfigurations(self):
     servicesList = ["HBASE"]
     configurations = {}


Mime
View raw message