You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2014/04/07 20:09:22 UTC

[2/2] git commit: AMBARI-5379. Add Flume service to installer UI configs. (akovalenko)

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


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

Branch: refs/heads/trunk
Commit: 53e0f8da2912622d8d8426da59d89182c2dcfcfc
Parents: 90973d3
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Mon Apr 7 21:08:37 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Mon Apr 7 21:08:37 2014 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step8_controller.js   | 19 ++++++++++++++++++-
 ambari-web/app/data/HDP2/site_properties.js      | 14 +++++++++++++-
 ambari-web/app/data/service_configs.js           |  9 +++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/53e0f8da/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 2509d54..bb3f5b8 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/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());
+    }
   },
 
   /**
@@ -1423,6 +1427,19 @@ App.WizardStep8Controller = Em.Controller.extend({
   },
 
   /**
+   * 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
    * @returns {{type: string, tag: string, properties: {}}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/53e0f8da/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 0ced041..9d31d63 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/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"
+    }
   ]
 };

http://git-wip-us.apache.org/repos/asf/ambari/blob/53e0f8da/ambari-web/app/data/service_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/service_configs.js b/ambari-web/app/data/service_configs.js
index 22acb91..2ea1958 100644
--- a/ambari-web/app/data/service_configs.js
+++ b/ambari-web/app/data/service_configs.js
@@ -280,6 +280,15 @@ module.exports = [
     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',
     configsValidator: App.userConfigsValidator,