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

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

Branch: refs/heads/branch-1.4-bk
Commit: 3a347511bfd403f7feaf31daa787c6feafbca56f
Parents: 0ae5179
Author: Jaimin Jetly <jai...@hortonworks.com>
Authored: Mon Nov 4 18:22:30 2013 -0800
Committer: Srimanth Gunturi <sgunt...@hortonworks.com>
Committed: Tue Nov 5 12:53:50 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step7_controller.js          | 2 +-
 ambari-web/app/utils/config.js                                 | 3 +--
 .../app/utils/defaults_providers/yarn_defaults_provider.js     | 6 +++---
 3 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/3a347511/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js 
b/ambari-web/app/controllers/wizard/step7_controller.js
index 5ac149b..efca8ae 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -93,7 +93,7 @@ App.WizardStep7Controller = Em.Controller.extend({
       configs = App.config.fileConfigsIntoTextarea(configs, 
'capacity-scheduler.xml');
     }
     //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));

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/3a347511/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 288665d..ab421be 100644
--- a/ambari-web/app/utils/config.js
+++ b/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 localDB = {
       hosts: App.db.getHosts(),

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/3a347511/ambari-web/app/utils/defaults_providers/yarn_defaults_provider.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/defaults_providers/yarn_defaults_provider.js 
b/ambari-web/app/utils/defaults_providers/yarn_defaults_provider.js
index 9e83949..4b10e97 100644
--- a/ambari-web/app/utils/defaults_providers/yarn_defaults_provider.js
+++ b/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;
   },

Reply via email to