Repository: ambari Updated Branches: refs/heads/branch-2.1 b270cd6a2 -> a26f98821
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/a26f9882 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a26f9882 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a26f9882 Branch: refs/heads/branch-2.1 Commit: a26f9882189f9c9b531538be69a2e26618004237 Parents: b270cd6 Author: Dmytro Sen <d...@apache.org> Authored: Tue Jun 16 14:28:29 2015 +0300 Committer: Dmytro Sen <d...@apache.org> Committed: Tue Jun 16 14:30:39 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/a26f9882/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/a26f9882/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