incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject [2/2] git commit: AMBARI-3752. MR jobs are hanging on a 2-node cluster with default configuration. (srimanth)
Date Wed, 13 Nov 2013 00:49:35 GMT
AMBARI-3752. MR jobs are hanging on a 2-node cluster with default configuration. (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/7bfddc9f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/7bfddc9f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/7bfddc9f

Branch: refs/heads/trunk
Commit: 7bfddc9f7226adce9a6d02673a6bc4a58c961c85
Parents: a9f5a47
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:48:58 2013 -0800

----------------------------------------------------------------------
 .../defaults_providers/yarn_defaults_provider.js | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7bfddc9f/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 7b4d365..2622e8d 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
@@ -79,7 +79,7 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
 
   /**
    * Maximum number of containers allowed per node
-   * min (2*cores,min (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;
@@ -98,12 +98,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. 
@@ -120,10 +120,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);
@@ -133,12 +133,11 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
   }.property('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