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 2013/11/06 22:15:03 UTC
git commit: AMBARI-3707. YARN dynamic configs generate 0 map/reduce
memory on 2GB machines. (srimanth)
Updated Branches:
refs/heads/trunk d6176141a -> 66dd2e84b
AMBARI-3707. YARN dynamic configs generate 0 map/reduce memory on 2GB machines. (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/66dd2e84
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/66dd2e84
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/66dd2e84
Branch: refs/heads/trunk
Commit: 66dd2e84b30eed3fed2845f7d9525939464e809f
Parents: d617614
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Wed Nov 6 13:07:50 2013 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Wed Nov 6 13:09:17 2013 -0800
----------------------------------------------------------------------
.../utils/configs/defaults_providers/yarn_defaults_provider.js | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/66dd2e84/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 070de87..a263602 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
@@ -101,6 +101,9 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
if (this.get('clusterData.hBaseInstalled')) {
ram -= this.get('hBaseRam')
}
+ if (ram < 1) {
+ ram = 1;
+ }
ram *= this.get('GB');
ram /= containerSize;
return Math.round(Math.max(cpu, Math.min(disk, ram)));
@@ -119,6 +122,9 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
if (this.get('clusterData.hBaseInstalled')) {
ram -= this.get('hBaseRam')
}
+ if (ram < 1) {
+ ram = 1;
+ }
ram *= this.get('GB');
var container_ram = Math.abs(ram / containers);
return container_ram > this.get('GB') ? container_ram / (512 * 512) : container_ram;