ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject git commit: AMBARI-3752. MR jobs are hanging on a 2-node cluster with default configuration. (srimanth)
Date Wed, 13 Nov 2013 01:03:41 GMT
Updated Branches:
  refs/heads/branch-1.4 5b204e1ce -> ef5b0aca6


AMBARI-3752. MR jobs are hanging on a 2-node cluster with default configuration. (srimanth)

Conflicts:
	ambari-web/app/utils/configs/defaults_providers/yarn_defaults_provider.js


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

Branch: refs/heads/branch-1.4
Commit: ef5b0aca6870cf6bd28f6fd5b6d3304831b92767
Parents: 5b204e1
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Tue Nov 12 14:48:11 2013 -0800
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Tue Nov 12 16:58:58 2013 -0800

----------------------------------------------------------------------
 .../yarn_defaults_provider.js                   | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ef5b0aca/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 4b49f0f..c12a300 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
@@ -86,8 +86,7 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
 
   /**
    * Maximum number of containers allowed per node
-   * max (2*cores,min (1.8*DISKS,(Total available RAM) / MIN_CONTAINER_SIZE)))
-   * min (2*CORES, 1.8*DISKS, (Total available RAM) / MIN_CONTAINER_SIZE)
+   * max(3, min (2*cores,min (1.8*DISKS,(Total available RAM) / MIN_CONTAINER_SIZE))))
    */
   containers: function () {
     if (!this.clusterDataIsValid()) return null;
@@ -106,12 +105,12 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
     }
     ram *= this.get('GB');
     ram /= containerSize;
-    return Math.round(Math.min(cpu, Math.min(disk, ram)));
+    return Math.round(Math.max(3, Math.min(cpu, Math.min(disk, ram))));
   }.property('clusterData.cpu', 'clusterData.ram', 'clusterData.hBaseInstalled', 'clusterData.disk',
'reservedRam', 'hBaseRam', 'recommendedMinimumContainerSize'),
 
   /**
    * Amount of RAM per container.
-   * Calculated to be max(1GB, RAM - reservedRam - hBaseRam) / containers
+   * Calculated to be max(2GB, RAM - reservedRam - hBaseRam) / containers
    *
    * @return Memory per container in MB. If greater than 1GB, 
    *          value will be in multiples of 512. 
@@ -125,10 +124,10 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
     }
     // On low memory systems, memory left over after
     // removing reserved-RAM and HBase might be
-    // less than 1GB (even negative). If so, we force
-    // a 1GB value relying on virtual memory.
-    if (ram < 1) {
-      ram = 1;
+    // 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');
     var container_ram = Math.abs(ram / containers);
@@ -138,12 +137,11 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
   }.property('recommendedMinimumContainerSize', 'containers', 'clusterData.ram', 'clusterData.hBaseInstalled',
'hBaseRam', 'reservedRam'),
 
   mapMemory: function () {
-    return this.get('ramPerContainer');
+    return Math.floor(this.get('ramPerContainer') / 2);
   }.property('ramPerContainer'),
 
   reduceMemory: function () {
-    var ramPerContainer = this.get('ramPerContainer');
-    return ramPerContainer <= 2048 ? 2 * ramPerContainer : ramPerContainer;
+    return this.get('ramPerContainer');
   }.property('ramPerContainer'),
 
   amMemory: function () {


Mime
View raw message