You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2014/02/19 14:25:20 UTC

git commit: AMBARI-4736. Storm: Add Storm REST API Server component. (Denys Buzhor via onechiporenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 4f996e435 -> 389267143


AMBARI-4736. Storm: Add Storm REST API Server component. (Denys Buzhor via onechiporenko)


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

Branch: refs/heads/trunk
Commit: 38926714346e00bd288abefc0386aa55907f7101
Parents: 4f996e4
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Wed Feb 19 15:23:35 2014 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Wed Feb 19 15:23:35 2014 +0200

----------------------------------------------------------------------
 .../controllers/main/service/info/configs.js    | 28 +++++++++-----------
 ambari-web/app/data/HDP2/global_properties.js   | 15 +++++++++++
 ambari-web/app/data/review_configs.js           |  6 +++++
 ambari-web/app/data/service_components.js       |  8 ++++++
 ambari-web/app/data/service_configs.js          |  1 +
 ambari-web/app/mappers/server_data_mapper.js    |  3 ++-
 ambari-web/app/models/host_component.js         |  1 +
 ambari-web/app/models/service_config.js         |  3 +++
 ambari-web/app/utils/helper.js                  |  1 +
 9 files changed, 50 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index e89c214..1f8565c 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -1535,21 +1535,19 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
         globalConfigs.push(hiveMetastoreHost);
         break;
       case 'STORM':
-        var stormUIServerHost = this.getMasterComponentHostValue('STORM_UI_SERVER');
-        var logviewerServerHost = this.getMasterComponentHostValue('LOGVIEWER_SERVER');
-        var drpcServerHost = this.getMasterComponentHostValue('DRPC_SERVER');
-
-        var stormUIServerHostConfig = serviceConfigs.findProperty('name','stormuiserver_host');
-        var logviewerServerHostConfig = serviceConfigs.findProperty('name','logviewerserver_host');
-        var drpcServerHostConfig = serviceConfigs.findProperty('name','drpcserver_host');
-
-        stormUIServerHostConfig.defaultValue = stormUIServerHost;
-        logviewerServerHostConfig.defaultValue = logviewerServerHost;
-        drpcServerHostConfig.defaultValue = drpcServerHost;
-
-        globalConfigs.push(stormUIServerHostConfig);
-        globalConfigs.push(logviewerServerHostConfig);
-        globalConfigs.push(drpcServerHostConfig);
+        var masterHostComponents = [
+          { name: 'STORM_UI_SERVER', propertyName: 'stormuiserver_host' },
+          { name: 'LOGVIEWER_SERVER', propertyName: 'logviewerserver_host' },
+          { name: 'DRPC_SERVER', propertyName: 'drpcserver_host' },
+          { name: 'STORM_REST_API', propertyName: 'storm_rest_api_host' }
+        ];
+
+        masterHostComponents.forEach(function(component) {
+          var hostValue = this.getMasterComponentHostValue(component.name);
+          var config = serviceConfigs.findProperty('name', component.propertyName);
+          config.defaultValue = hostValue;
+          globalConfigs.push(config);
+        }, this);
 
         var supervisorHosts = hostComponents.filterProperty('componentName','SUPERVISOR').mapProperty('host.hostName');
         if (supervisorHosts.length > 0) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/data/HDP2/global_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/global_properties.js b/ambari-web/app/data/HDP2/global_properties.js
index 35367da..bb7dd04 100644
--- a/ambari-web/app/data/HDP2/global_properties.js
+++ b/ambari-web/app/data/HDP2/global_properties.js
@@ -1460,6 +1460,21 @@ module.exports =
       "category": "Supervisor",
       "filename": "global.xml"
     },
+    {
+      "id": "puppet var",
+      "name": "storm_rest_api_host",
+      "displayName": "Storm REST API host",
+      "description": "The host that has been assigned to run Storm REST API Server",
+      "defaultValue": "",
+      "displayType": "masterHost",
+      "isReconfigurable": false,
+      "isVisible": true,
+      "isRequiredByAgent": false,
+      "serviceName": "STORM",
+      "isOverridable": false,
+      "category": "StormRestApi",
+      "filename": "global.xml"
+    },
   /**********************************************MISC***************************************/
     {
       "id": "puppet var",

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/data/review_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/review_configs.js b/ambari-web/app/data/review_configs.js
index 58825f1..2d7ef4a 100644
--- a/ambari-web/app/data/review_configs.js
+++ b/ambari-web/app/data/review_configs.js
@@ -284,6 +284,12 @@ module.exports = [
             isMaster: true
           }),
           Ember.Object.create({
+            display_name: 'Storm REST API Server',
+            component_name: 'STORM_REST_API',
+            component_value: '',
+            isMaster: true
+          }),
+          Ember.Object.create({
             display_name: 'Storm UI Server',
             component_name: 'STORM_UI_SERVER',
             component_value: '',

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/data/service_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/service_components.js b/ambari-web/app/data/service_components.js
index 8e53fea..0eaa3c8 100644
--- a/ambari-web/app/data/service_components.js
+++ b/ambari-web/app/data/service_components.js
@@ -397,6 +397,14 @@ module.exports = new Ember.Set([
     isMaster: true,
     isClient: false,
     description: 'Master component for STORM'
+  },
+  {
+    service_name: 'STORM',
+    component_name: 'STORM_REST_API',
+    display_name: 'Storm REST API Server',
+    isMaster: true,
+    isClient: false,
+    description: 'Master component for STORM'
   }
 ]);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/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 d68ce21..5660782 100644
--- a/ambari-web/app/data/service_configs.js
+++ b/ambari-web/app/data/service_configs.js
@@ -242,6 +242,7 @@ module.exports = [
       App.ServiceConfigCategory.create({ name: 'Nimbus', displayName : 'Nimbus'}),
       App.ServiceConfigCategory.create({ name: 'Supervisor', displayName : 'Supervisor'}),
       App.ServiceConfigCategory.create({ name: 'StormUIServer', displayName : 'Storm UI Server'}),
+      App.ServiceConfigCategory.create({ name: 'StormRestApi', displayName : 'Storm REST API Server'}),
       App.ServiceConfigCategory.create({ name: 'DRPCServer', displayName : 'DRPC Server'}),
       App.ServiceConfigCategory.create({ name: 'LogviewerServer', displayName : 'Logviewer Server'}),
       App.ServiceConfigCategory.create({ name: 'General', displayName : 'General'}),

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/mappers/server_data_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/server_data_mapper.js b/ambari-web/app/mappers/server_data_mapper.js
index 1939c46..0460d65 100644
--- a/ambari-web/app/mappers/server_data_mapper.js
+++ b/ambari-web/app/mappers/server_data_mapper.js
@@ -222,6 +222,7 @@ App.QuickDataMapper.componentServiceMap = function () {
     'SUPERVISOR': 'STORM',
     'STORM_UI_SERVER': 'STORM',
     'DRPC_SERVER': 'STORM',
-    'LOGVIEWER_SERVER': 'STORM'
+    'LOGVIEWER_SERVER': 'STORM',
+    'STORM_REST_API': 'STORM'
   }
 };

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/models/host_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index f46a1d6..31b16dd 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -83,6 +83,7 @@ App.HostComponent = DS.Model.extend({
       case 'STORM_UI_SERVER':
       case 'LOGVIEWER_SERVER':
       case 'DRPC_SERVER':
+      case 'STORM_REST_API':
       case 'RESOURCEMANAGER':
       case 'APP_TIMELINE_SERVER':
         return true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js
index dc82950..e99d170 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -415,6 +415,9 @@ App.ServiceConfigProperty = Ember.Object.extend({
       case 'stormuiserver_host':
         this.set('value', masterComponentHostsInDB.findProperty('component', 'STORM_UI_SERVER').hostName);
         break;
+      case 'storm_rest_api_host':
+        this.set('value', masterComponentHostsInDB.findProperty('component', 'STORM_REST_API').hostName);
+        break;
       case 'supervisor_hosts':
         this.set('value', slaveComponentHostsInDB.findProperty('componentName', 'SUPERVISOR').hosts.mapProperty('hostName'));
         break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/38926714/ambari-web/app/utils/helper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js
index c13eae2..3b9abf7 100644
--- a/ambari-web/app/utils/helper.js
+++ b/ambari-web/app/utils/helper.js
@@ -189,6 +189,7 @@ App.format = {
     'SECONDARY_NAMENODE': 'SNameNode',
     'SQOOP': 'Sqoop',
     'SQOOP_SERVICE_CHECK': 'Sqoop Service Check',
+    'STORM_REST_API': 'Storm REST API Server',
     'STORM_SERVICE_CHECK': 'Storm Service Check',
     'STORM_UI_SERVER': 'Storm UI Server',
     'SUPERVISOR': 'Supervisor',