Parcourir la source

AMBARI-4178 *-log4j configs for zookeeper, pig and mapreduce services aren't put to the Ambari Server. (ababiichuk)

aBabiichuk il y a 11 ans
Parent
commit
2c65034e8b

+ 7 - 5
ambari-web/app/controllers/wizard/step8_controller.js

@@ -1419,6 +1419,7 @@ App.WizardStep8Controller = Em.Controller.extend({
     if (selectedServices.someProperty('serviceName', 'YARN')) {
       this.get('serviceConfigTags').pushObject(this.createYarnSiteObj());
       this.get('serviceConfigTags').pushObject(this.createCapacityScheduler());
+      this.get('serviceConfigTags').pushObject(this.createLog4jObj('YARN'));
     }
     if (selectedServices.someProperty('serviceName', 'HBASE')) {
       this.get('serviceConfigTags').pushObject(this.createHbaseSiteObj());
@@ -1431,6 +1432,7 @@ App.WizardStep8Controller = Em.Controller.extend({
     if (selectedServices.someProperty('serviceName', 'HIVE')) {
       this.get('serviceConfigTags').pushObject(this.createHiveSiteObj('HIVE'));
       this.get('serviceConfigTags').pushObject(this.createLog4jObj('HIVE'));
+      this.get('serviceConfigTags').pushObject(this.createLog4jObj('HIVE-EXEC'));
     }
     if (selectedServices.someProperty('serviceName', 'WEBHCAT')) {
       this.get('serviceConfigTags').pushObject(this.createWebHCatSiteObj('WEBHCAT'));
@@ -1592,17 +1594,17 @@ App.WizardStep8Controller = Em.Controller.extend({
     return {"type": "hdfs-site", "tag": "version1", "properties": hdfsProperties };
   },
 
-  createLog4jObj: function (serviceName) {
-    serviceName = serviceName.toLowerCase();
-    var Log4jObj = this.get('configs').filterProperty('filename', serviceName + '-log4j.xml');
+  createLog4jObj: function (fileName) {
+    fileName = fileName.toLowerCase();
+    var Log4jObj = this.get('configs').filterProperty('filename', fileName + '-log4j.xml');
     var Log4jProperties = {};
     Log4jObj.forEach(function (_configProperty) {
       Log4jProperties[_configProperty.name] = App.config.escapeXMLCharacters(_configProperty.value);
-      this._recordHostOverrideFromObj(_configProperty, serviceName + '-log4j', 'version1', this);
+      this._recordHostOverrideFromObj(_configProperty, fileName + '-log4j', 'version1', this);
       console.log("STEP*: name of the property is: " + _configProperty.name);
       console.log("STEP8: value of the property is: " + _configProperty.value);
     }, this);
-    return {"type": serviceName + "-log4j", "tag": "version1", "properties": Log4jProperties };
+    return {"type": fileName + "-log4j", "tag": "version1", "properties": Log4jProperties };
   },
 
   createHueSiteObj: function () {

+ 6 - 4
ambari-web/app/data/service_configs.js

@@ -79,9 +79,10 @@ module.exports = [
       App.ServiceConfigCategory.create({ name: 'General', displayName : 'General'}),
       App.ServiceConfigCategory.create({ name: 'CapacityScheduler', displayName : 'Scheduler', isCapacityScheduler : true, isCustomView: true, siteFileName: 'capacity-scheduler.xml', siteFileNames: ['capacity-scheduler.xml', 'mapred-queue-acls.xml'], canAddProperty: App.supports.capacitySchedulerUi}),
       App.ServiceConfigCategory.create({ name: 'Advanced', displayName : 'Advanced'}),
-      App.ServiceConfigCategory.create({ name: 'AdvancedYARNSite', displayName : 'Custom yarn-site.xml', siteFileName: 'yarn-site.xml', canAddProperty: true})
+      App.ServiceConfigCategory.create({ name: 'AdvancedYARNSite', displayName : 'Custom yarn-site.xml', siteFileName: 'yarn-site.xml', canAddProperty: true}),
+      App.ServiceConfigCategory.create({ name: 'AdvancedYARNLog4j', displayName : 'Custom yarn-log4j.xml', siteFileName: 'yarn-log4j.xml', canAddProperty: true})
     ],
-    sites: ['global', 'yarn-site', 'capacity-scheduler'],
+    sites: ['global', 'yarn-site', 'capacity-scheduler', 'yarn-log4j'],
     configs: []
   },
 
@@ -110,9 +111,10 @@ module.exports = [
       App.ServiceConfigCategory.create({ name: 'Hive Metastore', displayName : 'Hive Metastore'}),
       App.ServiceConfigCategory.create({ name: 'Advanced', displayName : 'Advanced'}),
       App.ServiceConfigCategory.create({ name: 'AdvancedHiveSite', displayName : 'Custom hive-site.xml', siteFileName: 'hive-site.xml', canAddProperty: true}),
-      App.ServiceConfigCategory.create({ name: 'AdvancedHiveLog4j', displayName : 'Custom hive-log4j.xml', siteFileName: 'hive-log4j.xml', canAddProperty: true})
+      App.ServiceConfigCategory.create({ name: 'AdvancedHiveLog4j', displayName : 'Custom hive-log4j.xml', siteFileName: 'hive-log4j.xml', canAddProperty: true}),
+      App.ServiceConfigCategory.create({ name: 'AdvancedHiveExecLog4j', displayName : 'Custom hive-exec-log4j.xml', siteFileName: 'hive-exec-log4j.xml', canAddProperty: true})
     ],
-    sites: ['global', 'hive-site', 'hive-log4j'],
+    sites: ['global', 'hive-site', 'hive-log4j', 'hive-log4j-exec'],
     configs: []
   },