Browse Source

AMBARI-5379. Add Flume service to installer UI configs. (akovalenko)

Aleksandr Kovalenko 11 years ago
parent
commit
53e0f8da29

+ 18 - 1
ambari-web/app/controllers/wizard/step8_controller.js

@@ -1168,7 +1168,8 @@ App.WizardStep8Controller = Em.Controller.extend({
       PIG: {site: [], log4j: ['pig']},
       FALCON: {site: [{filename:'falcon-startup.properties',isXmlFile: false},{filename:'falcon-runtime.properties',isXmlFile: false}], log4j: []},
       TEZ: {site: [{filename:'tez-site',isXmlFile: true}], log4j: []},
-      ZOOKEEPER: {site: [], log4j: ['zookeeper']}
+      ZOOKEEPER: {site: [], log4j: ['zookeeper']},
+      FLUME: {site: [], log4j: []}
     };
 
     if (App.supports.capacitySchedulerUi) {
@@ -1194,6 +1195,9 @@ App.WizardStep8Controller = Em.Controller.extend({
     if (selectedServices.someProperty('serviceName', 'ZOOKEEPER')) {
       this.get('serviceConfigTags').pushObject(this.createZooCfgObj());
     }
+    if (selectedServices.someProperty('serviceName', 'FLUME')) {
+      this.get('serviceConfigTags').pushObject(this.createFlumeConfObj());
+    }
   },
 
   /**
@@ -1422,6 +1426,19 @@ App.WizardStep8Controller = Em.Controller.extend({
     return {type: 'zoo.cfg', tag: 'version1', properties: csProperties};
   },
 
+  /**
+   * Create flume.conf Object
+   * @returns {{type: string, tag: string, properties: {}}}
+   */
+  createFlumeConfObj: function () {
+    var configs = this.get('configs').filterProperty('filename', 'flume.conf');
+    var csProperties = {};
+    configs.forEach(function (_configProperty) {
+      csProperties[_configProperty.name] = App.config.escapeXMLCharacters(_configProperty.value);
+    }, this);
+    return {type: 'flume.conf', tag: 'version1', properties: csProperties};
+  },
+
   /**
    * Create site obj for Storm
    * Some config-properties should be modified in custom way

+ 13 - 1
ambari-web/app/data/HDP2/site_properties.js

@@ -1640,7 +1640,19 @@ module.exports =
       "filename": "core-site.xml",
       "serviceName": "GLUSTERFS",
       "category": "General"
-    }
+    },
 
+  /********************************************* flume.conf *****************************/
+    {
+      "id": "site property",
+      "serviceName": "FLUME",
+      "showLabel": false,
+      "isRequired": false,
+      "category": "AdvancedFlumeConf",
+      "displayName": "content",
+      "name": "content",
+      "displayType": "custom",
+      "filename": "flume.conf"
+    }
   ]
 };

+ 9 - 0
ambari-web/app/data/service_configs.js

@@ -279,6 +279,15 @@ module.exports = [
     sites: ['global', 'tez-site'],
     configs: []
   },
+  {
+    serviceName: 'FLUME',
+    displayName: 'Flume',
+    configCategories: [
+      App.ServiceConfigCategory.create({ name: 'AdvancedFlumeConf', displayName : 'flume.conf', siteFileName: 'flume.conf', canAddProperty: false})
+    ],
+    sites: ['flume.conf'],
+    configs: []
+  },
   {
     serviceName: 'MISC',
     displayName: 'Misc',