Updated Branches:
  refs/heads/trunk f77726510 -> 6e93225b5

AMBARI-3752. MR jobs are hanging on a 2-node cluster with default 
configuration. Fixing missed memory. (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/6e93225b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/6e93225b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/6e93225b

Branch: refs/heads/trunk
Commit: 6e93225b5e7a030ab67f6f2654d9fe1a2b8dc1db
Parents: f777265
Author: Srimanth Gunturi <sgunt...@hortonworks.com>
Authored: Tue Nov 12 17:37:02 2013 -0800
Committer: Srimanth Gunturi <sgunt...@hortonworks.com>
Committed: Tue Nov 12 17:37:02 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/6e93225b/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 15b30df..d651ad4 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
@@ -93,8 +93,12 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
     if (this.get('clusterData.hBaseInstalled')) {
       ram -= this.get('hBaseRam');
     }
-    if (ram < 1) {
-      ram = 1;
+    // On low memory systems, memory left over after
+    // removing reserved-RAM and HBase might be
+    // less than 2GB (even negative). If so, we force
+    // a 2GB value relying on virtual memory.
+    if (ram < 2) {
+      ram = 2;
     }
     ram *= this.get('GB');
     ram /= containerSize;

Reply via email to