ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-4246. Storm: Update Summary / Quicklinks to support Storm. (Denis Buzhor via onechiporenko)
Date Thu, 09 Jan 2014 12:12:54 GMT
Updated Branches:
  refs/heads/trunk 8448978de -> c95c7f75c


AMBARI-4246. Storm: Update Summary / Quicklinks to support Storm. (Denis 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/c95c7f75
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c95c7f75
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c95c7f75

Branch: refs/heads/trunk
Commit: c95c7f75cfb43e7705b785a584067b644e9f374b
Parents: 8448978
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Thu Jan 9 14:10:20 2014 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Thu Jan 9 14:10:56 2014 +0200

----------------------------------------------------------------------
 .../main/service/info/summary/storm.hbs          | 19 +++++++++++++++++++
 .../app/assets/data/alerts/HDP2/alerts.json      | 18 +++++++++++++++++-
 ambari-web/app/data/service_components.js        |  4 +++-
 ambari-web/app/models/quick_links.js             | 13 +++++++++++++
 ambari-web/app/models/service.js                 |  2 +-
 ambari-web/app/templates.js                      |  1 +
 .../app/templates/main/service/info/summary.hbs  |  3 +++
 .../app/views/common/quick_view_link_view.js     | 15 +++++++++++----
 .../app/views/main/service/info/summary.js       |  3 ++-
 9 files changed, 70 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/ambari-web/app/templates/main/service/info/summary/storm.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/ambari-web/app/templates/main/service/info/summary/storm.hbs b/ambari-web/ambari-web/app/templates/main/service/info/summary/storm.hbs
new file mode 100644
index 0000000..ff62e54
--- /dev/null
+++ b/ambari-web/ambari-web/app/templates/main/service/info/summary/storm.hbs
@@ -0,0 +1,19 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+{{!<!-- @todo create correct view after api implementing-->}}
+{{view view.sumMasterComponentView}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/app/assets/data/alerts/HDP2/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/HDP2/alerts.json b/ambari-web/app/assets/data/alerts/HDP2/alerts.json
index 2b70e97..40548e5 100644
--- a/ambari-web/app/assets/data/alerts/HDP2/alerts.json
+++ b/ambari-web/app/assets/data/alerts/HDP2/alerts.json
@@ -632,6 +632,22 @@
               "is_flapping" : "0",
               "last_check" : "1375308415",
               "service_type" : "ZOOKEEPER"
+            },
+            {
+              "service_description" : "Storm process down",
+              "host_name" : "dev01.hortonworks.com",
+              "current_attempt" : "1",
+              "current_state" : "0",
+              "plugin_output" : "TCP OK - 0.001 second response time on port 2181",
+              "last_hard_state_change" : "1375291434",
+              "last_hard_state" : "0",
+              "last_time_ok" : "1375308415",
+              "last_time_warning" : "0",
+              "last_time_unknown" : "0",
+              "last_time_critical" : "1375289980",
+              "is_flapping" : "0",
+              "last_check" : "1375308415",
+              "service_type" : "STORM"
             }
           ],
           "hostcounts" : {
@@ -653,4 +669,4 @@
       }
     }
   ]
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/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 74390f6..eba0c62 100644
--- a/ambari-web/app/data/service_components.js
+++ b/ambari-web/app/data/service_components.js
@@ -330,6 +330,7 @@ module.exports = new Ember.Set([
     isClient: true, 
     description: 'Client component for GLUSTERFS'
   },
+  // @todo change with real info about service component
   {
     service_name: 'STORM',
     component_name: 'NIMBUS',
@@ -338,6 +339,7 @@ module.exports = new Ember.Set([
     isClient: false,
     description: 'Master component for STORM'
   },
+  // @todo change with real info about service component
   {
     service_name: 'STORM',
     component_name: 'SUPERVISOR',
@@ -346,4 +348,4 @@ module.exports = new Ember.Set([
     isClient: false,
     description: 'Client component for STORM'
   }
-]);
\ No newline at end of file
+]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/app/models/quick_links.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/quick_links.js b/ambari-web/app/models/quick_links.js
index 4c308bb..6364c4c 100644
--- a/ambari-web/app/models/quick_links.js
+++ b/ambari-web/app/models/quick_links.js
@@ -388,5 +388,18 @@ App.QuickLinks.FIXTURES = [
     site: 'mapred-site',
     regex: portRegex,
     default_http_port: 19888
+  },
+  /* @todo Add real info about links */
+  {
+    id:31,
+    label:'Nimbus UI',
+    url:'%@://%@:%@/stacks',
+    service_id: 'STORM',
+    template:'%@://%@:%@/nimbus',
+    http_config: 'mapreduce.jobhistory.webapp.address',
+    https_config: 'mapreduce.jobhistory.webapp.https.address',
+    site: 'storm-site',
+    regex: portRegex,
+    default_http_port: 9292
   }
 ];

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/app/models/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js
index 5be8095..0cec410 100644
--- a/ambari-web/app/models/service.js
+++ b/ambari-web/app/models/service.js
@@ -28,7 +28,7 @@ App.Service = DS.Model.extend({
   rand: DS.attr('string'),
   toolTipContent: DS.attr('string'),
   alerts: DS.hasMany('App.Alert'),
-  quickLinks: DS.hasMany('App.QuickLinks'),
+  quickLinks: DS.hasMany('App.QuickLinks'),  // mapped in app/mappers/service_metrics_mapper.js
method - mapQuickLinks
   hostComponents: DS.hasMany('App.HostComponent'),
   serviceConfigsTemplate: App.config.get('preDefinedServiceConfigs'),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/app/templates.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates.js b/ambari-web/app/templates.js
index e906809..c625b2c 100644
--- a/ambari-web/app/templates.js
+++ b/ambari-web/app/templates.js
@@ -26,4 +26,5 @@ require('templates/main/service/info/summary/zookeeper');
 require('templates/main/service/info/summary/mapreduce2');
 require('templates/main/service/info/summary/hive');
 require('templates/main/service/info/summary/hue');
+require('templates/main/service/info/summary/storm');
 require('templates/main/admin/highAvailability/progress');

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/app/templates/main/service/info/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary.hbs b/ambari-web/app/templates/main/service/info/summary.hbs
index 3f23b77..76c2abe 100644
--- a/ambari-web/app/templates/main/service/info/summary.hbs
+++ b/ambari-web/app/templates/main/service/info/summary.hbs
@@ -62,6 +62,9 @@
             {{#if view.serviceStatus.flume}}
               {{view App.MainDashboardServiceFlumeView showOnlyRows=true serviceBinding="view.service"}}
             {{/if}}
+            {{#if view.serviceStatus.storm}}
+              {{template "templates/main/service/info/summary/storm"}}
+            {{/if}}
           </tbody>
         </table>
       </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/app/views/common/quick_view_link_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js
index 1d09e6d..49fb973 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -74,6 +74,11 @@ App.QuickViewLinks = Em.View.extend({
     this.setQuickLinks();
   },
 
+  findComponentHost: function (componentName) {
+    var components = this.get('content.hostComponents');
+    return App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName',
componentName).get('host.publicHostName')
+  },
+
   setQuickLinks: function () {
     this.loadTags();
     var serviceName = this.get('content.serviceName');
@@ -85,7 +90,7 @@ App.QuickViewLinks = Em.View.extend({
     switch (serviceName) {
       case "HDFS":
         if (this.get('content.snameNode')) { // not HA
-          host = App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName',
'NAMENODE').get('host.publicHostName');
+          host = this.findComponentHost('NAMENODE');
         } else {
           // HA
           if (this.get('content.activeNameNode')) {
@@ -118,13 +123,15 @@ App.QuickViewLinks = Em.View.extend({
         }
         break;
       case "YARN":
-        host = App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName',
'RESOURCEMANAGER').get('host.publicHostName');
+        host = this.findComponentHost('RESOURCEMANAGER');
         break;
       case "MAPREDUCE2":
-        host = App.singleNodeInstall ? App.singleNodeAlias : components.findProperty('componentName',
'HISTORYSERVER').get('host.publicHostName');
+        host = this.findComponentHost('HISTORYSERVER');
+        break;
+      case "STORM":
+        host = this.findComponentHost('NIMBUS');
         break;
     }
-
     if (!host) {
       quickLinks = [
         {

http://git-wip-us.apache.org/repos/asf/ambari/blob/c95c7f75/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 12d650d..730b5eb 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -46,7 +46,8 @@ App.MainServiceInfoSummaryView = Em.View.extend({
     ganglia:false,
     nagios:false,
     hue: false,
-    flume: false
+    flume: false,
+    storm: false
   },
 
   sumMasterComponentView : Em.View.extend({


Mime
View raw message