Quellcode durchsuchen

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

Srimanth Gunturi vor 11 Jahren
Ursprung
Commit
6e93225b5e

+ 6 - 2
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')) {
     if (this.get('clusterData.hBaseInstalled')) {
       ram -= this.get('hBaseRam');
       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 *= this.get('GB');
     ram /= containerSize;
     ram /= containerSize;