Kaynağa Gözat

AMBARI-3689: Invalid java opts configs in mapred-site. (jaimin)

Jaimin Jetly 11 yıl önce
ebeveyn
işleme
3ce506e2f3

+ 1 - 1
ambari-web/app/controllers/wizard/step7_controller.js

@@ -98,7 +98,7 @@ App.WizardStep7Controller = Em.Controller.extend({
       slaveComponentHosts: this.get('wizardController').getDBProperty('slaveComponentHosts')
     };
     //STEP 6: Distribute configs by service and wrap each one in App.ServiceConfigProperty (configs -> serviceConfigs)
-    var serviceConfigs = App.config.renderConfigs(configs, storedConfigs, this.get('allInstalledServiceNames'), this.get('selectedServiceNames'), localDB, storedConfigs);
+    var serviceConfigs = App.config.renderConfigs(configs, storedConfigs, this.get('allInstalledServiceNames'), this.get('selectedServiceNames'), localDB);
     this.set('stepConfigs', serviceConfigs);
     this.activateSpecialConfigs();
     this.set('selectedService', this.get('stepConfigs').filterProperty('showConfig', true).objectAt(0));

+ 1 - 2
ambari-web/app/utils/config.js

@@ -466,10 +466,9 @@ App.config = Em.Object.create({
    * @param allInstalledServiceNames
    * @param selectedServiceNames
    * @param localDB
-   * @param storedConfigs
    * @return {Array}
    */
-  renderConfigs: function (configs, storedConfigs, allInstalledServiceNames, selectedServiceNames, localDB, storedConfigs) {
+  renderConfigs: function (configs, storedConfigs, allInstalledServiceNames, selectedServiceNames, localDB) {
     var renderedServiceConfigs = [];
     var services = [];
 

+ 3 - 3
ambari-web/app/utils/defaults_providers/yarn_defaults_provider.js

@@ -216,11 +216,11 @@ App.YARNDefaultsProvider = App.DefaultsProvider.create({
     configs['yarn.scheduler.minimum-allocation-mb'] = Math.round(this.get('ramPerContainer'));
     configs['yarn.scheduler.maximum-allocation-mb'] = Math.round(this.get('containers') * this.get('ramPerContainer'));
     configs['yarn.app.mapreduce.am.resource.mb'] = Math.round(this.get('amMemory'));
-    configs['yarn.app.mapreduce.am.command-opts'] = Math.round(0.8 * this.get('amMemory'));
+    configs['yarn.app.mapreduce.am.command-opts'] = "-Xmx" + Math.round(0.8 * this.get('amMemory')) + "m";
     configs['mapreduce.map.memory.mb'] = Math.round(this.get('mapMemory'));
     configs['mapreduce.reduce.memory.mb'] = Math.round(this.get('reduceMemory'));
-    configs['mapreduce.map.java.opts'] = Math.round(0.8 * this.get('mapMemory'));
-    configs['mapreduce.reduce.java.opts'] = Math.round(0.8 * this.get('reduceMemory'));
+    configs['mapreduce.map.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('mapMemory')) + "m";
+    configs['mapreduce.reduce.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('reduceMemory')) + "m";
     configs['mapreduce.task.io.sort.mb'] = Math.round(0.4 * this.get('mapMemory'));
     return configs;
   },