You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2018/10/18 15:22:55 UTC
[ambari] branch trunk updated: [AMBARI-24800] service adviser
changes for cluster specific configs.(vbrodetskyi) (#2484)
This is an automated email from the ASF dual-hosted git repository.
vbrodetskyi pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 9124745 [AMBARI-24800] service adviser changes for cluster specific configs.(vbrodetskyi) (#2484)
9124745 is described below
commit 91247455a30f4de0a5af8bcfba92302360a47bff
Author: vbrodetskyi <vb...@cybervisiontech.com>
AuthorDate: Thu Oct 18 18:22:51 2018 +0300
[AMBARI-24800] service adviser changes for cluster specific configs.(vbrodetskyi) (#2484)
---
ambari-server/src/main/resources/stacks/stack_advisor.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py
index 850c21c..7b53648 100644
--- a/ambari-server/src/main/resources/stacks/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/stack_advisor.py
@@ -1181,7 +1181,7 @@ class DefaultStackAdvisor(StackAdvisor):
- def getConfigurationClusterSummary(self, servicesList, hosts, components, services):
+ def getConfigurationClusterSummary(self, servicesList, hosts, components, services, cpu_only_mode = False):
"""
Copied from HDP 2.0.6 so that it could be used by Service Advisors.
:return: Dictionary of memory and CPU attributes in the cluster
@@ -1304,8 +1304,9 @@ class DefaultStackAdvisor(StackAdvisor):
'''containers = max(3, min (2*cores,min (1.8*DISKS,(Total available RAM) / MIN_CONTAINER_SIZE))))'''
+ core_multiplier = 2 if not cpu_only_mode else 1
cluster["containers"] = int(round(max(3,
- min(2 * cluster["cpu"],
+ min(core_multiplier * cluster["cpu"],
min(ceil(1.8 * cluster["disk"]),
cluster["totalAvailableRam"] / cluster["minContainerSize"])))))
self.logger.info("Containers per node - cluster[containers]: " + str(cluster["containers"]))