Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 36B3A200B40 for ; Thu, 2 Jun 2016 05:35:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 35383160A4D; Thu, 2 Jun 2016 03:35:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7DDF9160A4C for ; Thu, 2 Jun 2016 05:35:46 +0200 (CEST) Received: (qmail 33248 invoked by uid 500); 2 Jun 2016 03:35:45 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 33239 invoked by uid 99); 2 Jun 2016 03:35:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2016 03:35:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6884AE0498; Thu, 2 Jun 2016 03:35:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mithmatt@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-16992: Recommend hawq_rm_nvcore_limit_perseg in HAWQ service advisor (mithmatt) Date: Thu, 2 Jun 2016 03:35:45 +0000 (UTC) archived-at: Thu, 02 Jun 2016 03:35:47 -0000 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 Authored: Wed Jun 1 20:34:58 2016 -0700 Committer: Matt 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. + + + hawq-site + hawq_global_rm_type + + int 0 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")