You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/03/08 00:17:05 UTC

[2/2] git commit: AMBARI-4999. Ambari should allow at least 3 yarn containers on a one-node installation. (srimanth)

AMBARI-4999. Ambari should allow at least 3 yarn containers on a one-node installation. (srimanth)


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

Branch: refs/heads/trunk
Commit: 3f119e345d8bff6d94c3669f5278735252e89b96
Parents: 87e84c6
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Fri Mar 7 13:25:44 2014 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Fri Mar 7 13:25:44 2014 -0800

----------------------------------------------------------------------
 .../configs/defaults_providers/yarn_defaults_provider.js     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f119e34/ambari-web/app/utils/configs/defaults_providers/yarn_defaults_provider.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/defaults_providers/yarn_defaults_provider.js b/ambari-web/app/utils/configs/defaults_providers/yarn_defaults_provider.js
index da395e0..6fb2405 100644
--- a/ambari-web/app/utils/configs/defaults_providers/yarn_defaults_provider.js
+++ b/ambari-web/app/utils/configs/defaults_providers/yarn_defaults_provider.js
@@ -225,12 +225,12 @@ App.YARNDefaultsProvider = App.DefaultsProvider.extend({
       return configs;
     }
     configs['yarn.nodemanager.resource.memory-mb'] = Math.round(this.get('containers') * this.get('ramPerContainer'));
-    configs['yarn.scheduler.minimum-allocation-mb'] = Math.round(this.get('ramPerContainer'));
+    configs['yarn.scheduler.minimum-allocation-mb'] = Math.floor(this.get('ramPerContainer'));
     configs['yarn.scheduler.maximum-allocation-mb'] = Math.round(this.get('containers') * this.get('ramPerContainer'));
-    configs['yarn.app.mapreduce.am.resource.mb'] = Math.round(this.get('amMemory'));
+    configs['yarn.app.mapreduce.am.resource.mb'] = Math.floor(this.get('amMemory'));
     configs['yarn.app.mapreduce.am.command-opts'] = "-Xmx" + Math.round(0.8 * this.get('amMemory')) + "m";
-    configs['mapreduce.map.memory.mb'] = Math.round(this.get('mapMemory'));
-    configs['mapreduce.reduce.memory.mb'] = Math.round(this.get('reduceMemory'));
+    configs['mapreduce.map.memory.mb'] = Math.floor(this.get('mapMemory'));
+    configs['mapreduce.reduce.memory.mb'] = Math.floor(this.get('reduceMemory'));
     configs['mapreduce.map.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('mapMemory')) + "m";
     configs['mapreduce.reduce.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('reduceMemory')) + "m";
     configs['mapreduce.task.io.sort.mb'] = Math.round(Math.min(0.4 * this.get('mapMemory'), 1024));