Updated Branches: refs/heads/branch-1.4 ef5b0aca6 -> b954a8d46
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/b954a8d4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/b954a8d4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/b954a8d4 Branch: refs/heads/branch-1.4 Commit: b954a8d4632dc62fa0fb89186a977d7eaee7366e Parents: ef5b0ac 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:45:56 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/b954a8d4/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 c12a300..4950b6b 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 @@ -100,8 +100,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;