From 043267ca8898a44740035a3cc0cf349462c1a0af Mon Sep 17 00:00:00 2001 From: David Grier Date: Wed, 15 Feb 2017 22:37:55 +0000 Subject: [PATCH] added bounderies to yarn mem allocation --- playbooks/library/site_facts/sitefacts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/library/site_facts/sitefacts.py b/playbooks/library/site_facts/sitefacts.py index b120907..1fd6e2c 100644 --- a/playbooks/library/site_facts/sitefacts.py +++ b/playbooks/library/site_facts/sitefacts.py @@ -268,9 +268,9 @@ def hdfs_site_facts(): def yarn_site_facts(container_ram,containers): yarn_site=dict() - yarn_site['yarn_scheduler_minimum_allocation_mb']=container_ram - yarn_site['yarn_scheduler_maximum_allocation_mb']=(containers*container_ram) - yarn_site['yarn_nodemanager_resource_memory_mb']=(containers*container_ram) + yarn_site['yarn_scheduler_minimum_allocation_mb']=clip(1024, container_ram, 8192) + yarn_site['yarn_scheduler_maximum_allocation_mb']=clip(1024, (containers*container_ram), 8192) + yarn_site['yarn_nodemanager_resource_memory_mb']=clip(1024, (containers*container_ram), 8192) yarn_site['yarn_timeline-service_store-class'] = "org.apache.hadoop.yarn.server.timeline.RollingLevelDBTimelineStore" yarn_site['yarn_timeline-service_generic-application-history_save-non-am-container-meta-info'] = "false"