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

ambari git commit: AMBARI-11918 Configs: not enough physical memory warning - not actionable, persistent, and annoying (dsen)

Repository: ambari
Updated Branches:
  refs/heads/trunk b508d0396 -> f84ef816c


AMBARI-11918 Configs: not enough physical memory warning - not actionable, persistent, and annoying (dsen)


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

Branch: refs/heads/trunk
Commit: f84ef816c2027bad092c7a33d133ea35c6fb94d1
Parents: b508d03
Author: Dmytro Sen <ds...@apache.org>
Authored: Tue Jun 16 14:28:29 2015 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Tue Jun 16 14:28:29 2015 +0300

----------------------------------------------------------------------
 .../stacks/HDP/2.0.6/services/stack_advisor.py  | 22 -------------------
 .../stacks/HDPWIN/2.1/services/stack_advisor.py | 23 +-------------------
 2 files changed, 1 insertion(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f84ef816/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index 1c099fd..b48c70a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -347,28 +347,6 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 
   def validateClusterConfigurations(self, configurations, services, hosts):
     validationItems = []
-    hostComponents = {}
-    failureMessage = ""
-
-    for service in services["services"]:
-      for component in service["components"]:
-        if component["StackServiceComponents"]["hostnames"] is not None:
-          for hostName in component["StackServiceComponents"]["hostnames"]:
-            if hostName not in hostComponents.keys():
-              hostComponents[hostName] = []
-            hostComponents[hostName].append(component["StackServiceComponents"]["component_name"])
-
-    for host in hosts["items"]:
-      if host["Hosts"]["host_name"] in hostComponents:
-        # Not enough physical memory
-        requiredMemory = getMemorySizeRequired(hostComponents[host["Hosts"]["host_name"]], configurations)
-        if host["Hosts"]["total_mem"] * 1024 < requiredMemory:  # in bytes
-          failureMessage += "Not enough physical RAM on the host {0}. " \
-                            "At least {1} MB is recommended based on components assigned.\n" \
-            .format(host["Hosts"]["host_name"], requiredMemory/1048576)  # MB
-    if failureMessage:
-      notEnoughMemoryItem = self.getWarnItem(failureMessage)
-      validationItems.extend([{"config-name": "", "item": notEnoughMemoryItem}])
 
     return self.toConfigurationValidationProblems(validationItems, "")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f84ef816/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
index dc64770..b8334e3 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py
@@ -340,27 +340,6 @@ class HDPWIN21StackAdvisor(DefaultStackAdvisor):
 
   def validateClusterConfigurations(self, configurations, services, hosts):
     validationItems = []
-    hostComponents = {}
-    failureMessage = ""
-
-    for service in services["services"]:
-      for component in service["components"]:
-        if component["StackServiceComponents"]["hostnames"] is not None:
-          for hostName in component["StackServiceComponents"]["hostnames"]:
-            if hostName not in hostComponents.keys():
-              hostComponents[hostName] = []
-            hostComponents[hostName].append(component["StackServiceComponents"]["component_name"])
-
-    for host in hosts["items"]:
-      # Not enough physical memory
-      requiredMemory = getMemorySizeRequired(hostComponents[host["Hosts"]["host_name"]], configurations)
-      if host["Hosts"]["total_mem"] * 1024 < requiredMemory:  # in bytes
-        failureMessage += "Not enough physical RAM on the host {0}. " \
-                          "At least {1} MB is recommended based on components assigned.\n" \
-          .format(host["Hosts"]["host_name"], requiredMemory/1048576)  # MB
-    if failureMessage:
-      notEnoughMemoryItem = self.getWarnItem(failureMessage)
-      validationItems.extend([{"config-name": "", "item": notEnoughMemoryItem}])
 
     return self.toConfigurationValidationProblems(validationItems, "")
 
@@ -850,4 +829,4 @@ def getMemorySizeRequired(components, configurations):
 
         totalMemoryRequired += formatXmxSizeToBytes(heapsize)
 
-  return totalMemoryRequired
\ No newline at end of file
+  return totalMemoryRequired