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/11/24 09:58:38 UTC
ambari git commit: AMBARI-14024 Yarn hadoop.registry.rm.enabled value
should be fetched from stack adviser (dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk 702f832a2 -> bd1b743cf
AMBARI-14024 Yarn hadoop.registry.rm.enabled value should be fetched from stack adviser (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bd1b743c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bd1b743c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bd1b743c
Branch: refs/heads/trunk
Commit: bd1b743cf404d6c9e3d67b4ebaca4de7d332300b
Parents: 702f832
Author: Dmytro Sen <ds...@apache.org>
Authored: Tue Nov 24 10:58:21 2015 +0200
Committer: Dmytro Sen <ds...@apache.org>
Committed: Tue Nov 24 10:58:21 2015 +0200
----------------------------------------------------------------------
.../stacks/HDP/2.2/services/stack_advisor.py | 6 ++++
.../stacks/2.2/common/test_stack_advisor.py | 38 ++++++++++++++++----
2 files changed, 37 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/bd1b743c/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
index 7201de8..a10b143 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py
@@ -92,6 +92,12 @@ class HDP22StackAdvisor(HDP21StackAdvisor):
putYarnPropertyAttribute('yarn.nodemanager.container-executor.cgroups.hierarchy', 'delete', 'true')
putYarnPropertyAttribute('yarn.nodemanager.container-executor.cgroups.mount', 'delete', 'true')
putYarnPropertyAttribute('yarn.nodemanager.linux-container-executor.cgroups.mount-path', 'delete', 'true')
+ # recommend hadoop.registry.rm.enabled based on SLIDER in services
+ servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+ if "SLIDER" in servicesList:
+ putYarnProperty('hadoop.registry.rm.enabled', 'true')
+ else:
+ putYarnProperty('hadoop.registry.rm.enabled', 'false')
def recommendHDFSConfigurations(self, configurations, clusterData, services, hosts):
super(HDP22StackAdvisor, self).recommendHDFSConfigurations(configurations, clusterData, services, hosts)
http://git-wip-us.apache.org/repos/asf/ambari/blob/bd1b743c/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
index 0acaaff..4a9da8a 100644
--- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py
@@ -691,6 +691,23 @@ class TestHDP22StackAdvisor(TestCase):
def test_recommendYARNConfigurations(self):
configurations = {}
services = {"configurations": configurations}
+ services['services'] = [
+ {
+ "StackServices": {
+ "service_name": "HDFS"
+ },
+ },
+ {
+ "StackServices": {
+ "service_name": "YARN"
+ },
+ },
+ {
+ "StackServices": {
+ "service_name": "SLIDER"
+ },
+ }
+ ]
clusterData = {
"cpu": 4,
"containers" : 5,
@@ -710,7 +727,8 @@ class TestHDP22StackAdvisor(TestCase):
"yarn.scheduler.maximum-allocation-mb": "1280",
"yarn.scheduler.maximum-allocation-vcores": "4",
"yarn.scheduler.minimum-allocation-vcores": "1",
- "yarn.nodemanager.resource.cpu-vcores": "4"
+ "yarn.nodemanager.resource.cpu-vcores": "4",
+ "hadoop.registry.rm.enabled": "true"
}
}
}
@@ -753,7 +771,8 @@ class TestHDP22StackAdvisor(TestCase):
"yarn.scheduler.maximum-allocation-vcores": "2",
"yarn.scheduler.minimum-allocation-vcores": "1",
"yarn.scheduler.maximum-allocation-mb": "1280",
- "yarn.nodemanager.resource.cpu-vcores": "2"
+ "yarn.nodemanager.resource.cpu-vcores": "2",
+ "hadoop.registry.rm.enabled": "false"
},
"property_attributes": {
'yarn.nodemanager.resource.memory-mb': {'maximum': '1877'},
@@ -1462,7 +1481,8 @@ class TestHDP22StackAdvisor(TestCase):
"yarn.scheduler.maximum-allocation-vcores": "1",
"yarn.scheduler.minimum-allocation-vcores": "1",
"yarn.scheduler.maximum-allocation-mb": "1792",
- "yarn.nodemanager.resource.cpu-vcores": "1"
+ "yarn.nodemanager.resource.cpu-vcores": "1",
+ "hadoop.registry.rm.enabled": "false"
},
"property_attributes": {
'yarn.nodemanager.resource.memory-mb': {'maximum': '1877'},
@@ -1722,7 +1742,8 @@ class TestHDP22StackAdvisor(TestCase):
"yarn.scheduler.maximum-allocation-vcores": "1",
"yarn.scheduler.minimum-allocation-vcores": "1",
"yarn.scheduler.maximum-allocation-mb": "1280",
- "yarn.nodemanager.resource.cpu-vcores": "1"
+ "yarn.nodemanager.resource.cpu-vcores": "1",
+ "hadoop.registry.rm.enabled": "false"
},
"property_attributes": {
'yarn.nodemanager.resource.memory-mb': {'maximum': '1877'},
@@ -1934,7 +1955,8 @@ class TestHDP22StackAdvisor(TestCase):
"yarn.scheduler.maximum-allocation-vcores": "1",
"yarn.scheduler.minimum-allocation-vcores": "1",
"yarn.scheduler.maximum-allocation-mb": "1280",
- "yarn.nodemanager.resource.cpu-vcores": "1"
+ "yarn.nodemanager.resource.cpu-vcores": "1",
+ "hadoop.registry.rm.enabled": "false"
},
"property_attributes": {
'yarn.nodemanager.resource.memory-mb': {'maximum': '1877'},
@@ -3225,7 +3247,8 @@ class TestHDP22StackAdvisor(TestCase):
"yarn.nodemanager.resource.cpu-vcores": "4",
"yarn.nodemanager.container-executor.cgroups.hierarchy": " /yarn",
"yarn.scheduler.maximum-allocation-mb": "39424",
- "yarn.nodemanager.container-executor.resources-handler.class": "org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler"
+ "yarn.nodemanager.container-executor.resources-handler.class": "org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler",
+ "hadoop.registry.rm.enabled": "false"
},
"property_attributes": {
"yarn.scheduler.minimum-allocation-vcores": {
@@ -3279,7 +3302,8 @@ class TestHDP22StackAdvisor(TestCase):
"yarn.nodemanager.resource.cpu-vcores": "4",
"yarn.nodemanager.container-executor.cgroups.hierarchy": " /yarn",
"yarn.scheduler.maximum-allocation-mb": "39424",
- "yarn.nodemanager.container-executor.resources-handler.class": "org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler"
+ "yarn.nodemanager.container-executor.resources-handler.class": "org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler",
+ "hadoop.registry.rm.enabled": "false"
},
"property_attributes": {
"yarn.nodemanager.container-executor.cgroups.mount": {