ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mithm...@apache.org
Subject ambari git commit: AMBARI-16992: Recommend hawq_rm_nvcore_limit_perseg in HAWQ service advisor (mithmatt)
Date Thu, 02 Jun 2016 03:35:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 c0f4d1b6f -> 4544d26fc


AMBARI-16992: Recommend hawq_rm_nvcore_limit_perseg in HAWQ service advisor (mithmatt)


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

Branch: refs/heads/branch-2.4
Commit: 4544d26fc049dcb2f6d712665eab865416f216ba
Parents: c0f4d1b
Author: Matt <mmathew@pivotal.io>
Authored: Wed Jun 1 20:34:58 2016 -0700
Committer: Matt <mmathew@pivotal.io>
Committed: Wed Jun 1 20:34:58 2016 -0700

----------------------------------------------------------------------
 .../HAWQ/2.0.0/configuration/hawq-site.xml           |  6 ++++++
 .../common-services/HAWQ/2.0.0/service_advisor.py    |  2 +-
 .../python/stacks/2.3/HAWQ/test_service_advisor.py   | 15 +++++++++------
 3 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4544d26f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
index ee71e6e..3ac4e89 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-site.xml
@@ -209,6 +209,12 @@
       The maximum number of virtual cores that can be used for query execution in a HAWQ
segment when Resource Manager ('hawq_global_rm_type') is set to Standalone ('none').
       The default is 16.
     </description>
+    <depends-on>
+      <property>
+        <type>hawq-site</type>
+        <name>hawq_global_rm_type</name>
+      </property>
+    </depends-on>
     <value-attributes>
       <type>int</type>
       <minimum>0</minimum>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4544d26f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py
index 32e23f9..28eb82f 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py
@@ -168,7 +168,7 @@ class HAWQ200ServiceAdvisor(service_advisor.ServiceAdvisor):
           buckets = factor * numSegments
         putHawqSiteProperty('default_hash_table_bucket_number', buckets)
 
-      if "hawq_rm_nvcore_limit_perseg" in hawq_site:
+      if "hawq_global_rm_type" in hawq_site and hawq_site["hawq_global_rm_type"] == "none"
and "hawq_rm_nvcore_limit_perseg" in hawq_site:
         putHawqSiteProperty('hawq_rm_nvcore_limit_perseg', minHawqHostsCoreCount)
 
       # update YARN RM urls with the values from yarn-site if YARN is installed

http://git-wip-us.apache.org/repos/asf/ambari/blob/4544d26f/ambari-server/src/test/python/stacks/2.3/HAWQ/test_service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_service_advisor.py b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_service_advisor.py
index 6531454..5750938 100644
--- a/ambari-server/src/test/python/stacks/2.3/HAWQ/test_service_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.3/HAWQ/test_service_advisor.py
@@ -142,7 +142,8 @@ class TestHAWQ200ServiceAdvisor(TestCase):
       "hawq-site": {
         "properties": {
           "hawq_rm_memory_limit_perseg": "67108864KB",
-          "hawq_rm_nvcore_limit_perseg": "16"
+          "hawq_rm_nvcore_limit_perseg": "16",
+          "hawq_global_rm_type": "yarn"
         }
       }
     }
@@ -217,16 +218,18 @@ class TestHAWQ200ServiceAdvisor(TestCase):
 
     # Case 1:
     # HAWQ Hosts Core Count: c6401.ambari.apache.org - 2, c6402.ambari.apache.org - 4, c6404.ambari.apache.org
- 2
+    # hawq_global_rm_type: yarn
     # Non HAWQ Hosts Core Count: c6401.ambari.apache.org - 1
-    # Recommend hawq_rm_nvcore_limit_perseg as 2
+    # Do not recommend hawq_rm_nvcore_limit_perseg when rm type is yarn
     self.serviceAdvisor.getServiceConfigurationRecommendations(self.stackAdvisor, configurations,
None, services, hosts)
-    self.assertEquals(configurations["hawq-site"]["properties"]["hawq_rm_nvcore_limit_perseg"],
"2")
+    self.assertEquals(configurations["hawq-site"]["properties"]["hawq_rm_nvcore_limit_perseg"],
"16")
 
     # Case 2:
-    # HAWQ Hosts Core Count: c6401.ambari.apache.org - 2, c6402.ambari.apache.org - 2, c6404.ambari.apache.org
- 2
+    # HAWQ Hosts Core Count: c6401.ambari.apache.org - 2, c6402.ambari.apache.org - 4, c6404.ambari.apache.org
- 2
+    # hawq_global_rm_type: none
     # Non HAWQ Hosts Core Count: c6401.ambari.apache.org - 1
-    # Recommend hawq_rm_nvcore_limit_perseg as 2
-    hosts["items"][1]["Hosts"]["cpu_count"] = 2
+    # Recommend hawq_rm_nvcore_limit_perseg when rm type is none
+    configurations["hawq-site"]["properties"]["hawq_global_rm_type"] = "none"
     self.serviceAdvisor.getServiceConfigurationRecommendations(self.stackAdvisor, configurations,
None, services, hosts)
     self.assertEquals(configurations["hawq-site"]["properties"]["hawq_rm_nvcore_limit_perseg"],
"2")
 


Mime
View raw message