You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by tb...@apache.org on 2013/06/20 20:09:31 UTC
svn commit: r1495115 [10/10] - in /incubator/ambari/trunk:
ambari-agent/src/main/puppet/modules/hdp-flume/
ambari-agent/src/main/puppet/modules/hdp-flume/files/
ambari-agent/src/main/puppet/modules/hdp-flume/manifests/
ambari-agent/src/main/puppet/modu...
Modified: incubator/ambari/trunk/ambari-web/app/controllers/global/update_controller.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/global/update_controller.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/global/update_controller.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/global/update_controller.js Thu Jun 20 18:09:29 2013
@@ -80,8 +80,8 @@ App.UpdateController = Em.Controller.ext
self.set('isUpdated', false);
var servicesUrl = isInitialLoad ?
//this.getUrl('/data/dashboard/services.json', '/services?fields=components/ServiceComponentInfo,components/host_components,components/host_components/HostRoles') :
- this.getUrl('/data/dashboard/services.json', '/services?fields=components/ServiceComponentInfo,components/host_components,components/host_components/HostRoles,components/host_components/metrics/jvm/memHeapUsedM,components/host_components/metrics/jvm/memHeapCommittedM,components/host_components/metrics/mapred/jobtracker/trackers_decommissioned,components/host_components/metrics/cpu/cpu_wio,components/host_components/metrics/rpc/RpcQueueTime_avg_time'):
- this.getUrl('/data/dashboard/services.json', '/services?fields=components/ServiceComponentInfo,components/host_components,components/host_components/HostRoles,components/host_components/metrics/jvm/memHeapUsedM,components/host_components/metrics/jvm/memHeapCommittedM,components/host_components/metrics/mapred/jobtracker/trackers_decommissioned,components/host_components/metrics/cpu/cpu_wio,components/host_components/metrics/rpc/RpcQueueTime_avg_time');
+ this.getUrl('/data/dashboard/services.json', '/services?fields=components/ServiceComponentInfo,components/host_components,components/host_components/HostRoles,components/host_components/metrics/jvm/memHeapUsedM,components/host_components/metrics/jvm/memHeapCommittedM,components/host_components/metrics/mapred/jobtracker/trackers_decommissioned,components/host_components/metrics/cpu/cpu_wio,components/host_components/metrics/rpc/RpcQueueTime_avg_time,components/host_components/metrics/flume/flume'):
+ this.getUrl('/data/dashboard/services.json', '/services?fields=components/ServiceComponentInfo,components/host_components,components/host_components/HostRoles,components/host_components/metrics/jvm/memHeapUsedM,components/host_components/metrics/jvm/memHeapCommittedM,components/host_components/metrics/mapred/jobtracker/trackers_decommissioned,components/host_components/metrics/cpu/cpu_wio,components/host_components/metrics/rpc/RpcQueueTime_avg_time,components/host_components/metrics/flume/flume');
var callback = callback || function (jqXHR, textStatus) {
self.set('isUpdated', true);
};
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/service/item.js Thu Jun 20 18:09:29 2013
@@ -245,6 +245,10 @@ App.MainServiceItemController = Em.Contr
}
}.observes('App.router.backgroundOperationsController.serviceTimestamp'),
+
+ isServiceRestartable: function() {
+ return this.get('content.serviceName') !== "FLUME";
+ }.property('content.serviceName'),
isStartDisabled: function () {
if(this.get('isPending')) return true;
@@ -258,4 +262,4 @@ App.MainServiceItemController = Em.Contr
isPending:true
-})
\ No newline at end of file
+})
Modified: incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js (original)
+++ incubator/ambari/trunk/ambari-web/app/mappers/service_mapper.js Thu Jun 20 18:09:29 2013
@@ -28,6 +28,7 @@ App.servicesMapper = App.QuickDataMapper
'HIVE',
'HCATALOG',
'WEBHCAT',
+ 'FLUME',
'OOZIE',
'GANGLIA',
'NAGIOS',
@@ -173,12 +174,23 @@ App.servicesMapper = App.QuickDataMapper
finalJson.rand = Math.random();
result.push(finalJson);
App.store.load(App.HBaseService, finalJson);
- }
- else {
- finalJson = this.parseIt(item, this.config);
- finalJson.rand = Math.random();
- result.push(finalJson);
- }
+ } else
+ if (item && item.ServiceInfo && item.ServiceInfo.service_name == "FLUME") {
+ finalJson = this.flumeMapper(item);
+ finalJson.rand = Math.random();
+ result.push(finalJson);
+ if(finalJson.nodeObjs){
+ finalJson.nodeObjs.forEach(function(no){
+ App.store.load(App.FlumeNode, no);
+ });
+ }
+ App.store.load(App.FlumeService, finalJson);
+ }
+ else {
+ finalJson = this.parseIt(item, this.config);
+ finalJson.rand = Math.random();
+ result.push(finalJson);
+ }
}, this);
@@ -353,7 +365,6 @@ App.servicesMapper = App.QuickDataMapper
},
hbaseMapper: function (item) {
// Change the JSON so that it is easy to map
- var result = [];
var finalConfig = jQuery.extend({}, this.config);
var hbaseConfig = this.hbaseConfig;
item.components.forEach(function (component) {
@@ -378,5 +389,68 @@ App.servicesMapper = App.QuickDataMapper
finalJson = this.parseIt(item, finalConfig);
finalJson.quick_links = [13, 14, 15, 16, 17, 18];
return finalJson;
+ },
+
+ /**
+ * Flume is different from other services, in that the important
+ * data is in customizeable channels. Hence we directly transfer
+ * data into the JSON object.
+ */
+ flumeMapper: function (item) {
+ var finalConfig = jQuery.extend({}, this.config);
+ var finalJson = this.parseIt(item, finalConfig);
+ ;
+ item.components.forEach(function (component) {
+ if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "FLUME_SERVER") {
+ if (!finalJson.nodes) {
+ finalJson.nodes = [];
+ }
+ if (!finalJson.nodeObjs) {
+ finalJson.nodeObjs = [];
+ }
+ if (component.host_components) {
+ component.host_components.forEach(function (hc) {
+ var fnode = {};
+ fnode.id = hc.HostRoles.host_name;
+ fnode.host_id = hc.HostRoles.host_name;
+ fnode.channels = "";
+ fnode.sources = "";
+ fnode.sinks = "";
+ if (hc.metrics != null && hc.metrics.flume && hc.metrics.flume.flume && hc.metrics.flume.flume) {
+ if (hc.metrics.flume.flume.CHANNEL) {
+ for ( var c in hc.metrics.flume.flume.CHANNEL) {
+ if (fnode.channels.length < 1) {
+ fnode.channels += c;
+ } else {
+ fnode.channels += ("," + c);
+ }
+ }
+ }
+ if (hc.metrics.flume.flume.SINK) {
+ for ( var c in hc.metrics.flume.flume.SINK) {
+ if (fnode.sinks.length < 1) {
+ fnode.sinks += c;
+ } else {
+ fnode.sinks += ("," + c);
+ }
+ }
+ }
+ if (hc.metrics.flume.flume.SOURCE) {
+ for ( var c in hc.metrics.flume.flume.SOURCE) {
+ if (fnode.sources.length < 1) {
+ fnode.sources += c;
+ } else {
+ fnode.sources += ("," + c);
+ }
+ }
+ }
+ }
+ finalJson.nodeObjs.push(fnode);
+ finalJson.nodes.push(hc.HostRoles.host_name);
+ });
+ }
+ }
+ });
+ return finalJson;
}
});
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-web/app/messages.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/messages.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/messages.js (original)
+++ incubator/ambari/trunk/ambari-web/app/messages.js Thu Jun 20 18:09:29 2013
@@ -701,6 +701,20 @@ Em.I18n.translations = {
'services.service.summary.notAvailable':'n/a',
'services.service.summary.diskInfoBar.used':'used',
+ 'services.service.info.metrics.flume.channelFillPercent':'Channel Fill Percentage',
+ 'services.service.info.metrics.flume.channelSize':'Channel Size',
+ 'services.service.info.metrics.flume.sinkDrainSuccess':'Sink Event Drain Count',
+ 'services.service.info.metrics.flume.sourceAccepted':'Source Event Accepted Count',
+ 'services.service.info.metrics.flume.sinkConnectionFailed':'Sink Connection Failed Count',
+ 'services.service.info.metrics.flume.gc':'Garbage Collection Time',
+ 'services.service.info.metrics.flume.cpu.user':'CPU (User)',
+ 'services.service.info.metrics.flume.jvmThreadsRunnable':'JVM Runnable Threads',
+ 'services.service.info.metrics.flume.jvmHeapUsed':'JVM Heap Memory Used',
+ 'services.service.info.metrics.flume.channelName':'Channel {0}',
+ 'services.service.info.metrics.flume.sinkName':'Sink {0}',
+ 'services.service.info.metrics.flume.sourceName':'Source {0}',
+ 'services.service.info.metrics.flume.hostName':'Host: {0}',
+
'services.service.info.metrics.hbase.clusterRequests':'Cluster Requests',
'services.service.info.metrics.hbase.clusterRequests.displayNames.requestCount':'Request Count',
'services.service.info.metrics.hbase.hlogSplitSize':'HLog Split Size',
@@ -1068,6 +1082,14 @@ Em.I18n.translations = {
'dashboard.services.mapreduce.jobTrackerUptime':'Job Trackers Uptime',
'dashboard.services.mapreduce.chart.label':'Jobs Running',
+ 'dashboard.services.flume.summary.single':'{0} Flume Agent',
+ 'dashboard.services.flume.summary.multiple':'{0} Flume Agents',
+ 'dashboard.services.flume.agentsLabel': 'Flume Agents',
+ 'dashboard.services.flume.channels': 'Channels',
+ 'dashboard.services.flume.sources': 'Sources',
+ 'dashboard.services.flume.sinks': 'Sinks',
+
+
'dashboard.services.hbase.summary':'{0} region servers with {1} average load',
'dashboard.services.hbase.masterServer':'HBase Master',
'dashboard.services.hbase.noMasterServer':'No Active Master',
Modified: incubator/ambari/trunk/ambari-web/app/models.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models.js Thu Jun 20 18:09:29 2013
@@ -31,6 +31,7 @@ require('models/service_audit');
require('models/service/hdfs');
require('models/service/mapreduce');
require('models/service/hbase');
+require('models/service/flume');
require('models/alert');
require('models/user');
require('models/host');
Modified: incubator/ambari/trunk/ambari-web/app/models/host_component.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/host_component.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/host_component.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/host_component.js Thu Jun 20 18:09:29 2013
@@ -55,6 +55,7 @@ App.HostComponent = DS.Model.extend({
case 'WEBHCAT_SERVER':
case 'HUE_SERVER':
case 'HISTORYSERVER':
+ case 'FLUME_SERVER':
return true;
default:
return false;
Modified: incubator/ambari/trunk/ambari-web/app/models/service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/service.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/service.js (original)
+++ incubator/ambari/trunk/ambari-web/app/models/service.js Thu Jun 20 18:09:29 2013
@@ -162,6 +162,8 @@ App.Service = DS.Model.extend({
return 'Nagios';
case 'hue':
return 'Hue';
+ case 'flume':
+ return 'Flume';
}
return this.get('serviceName');
}.property('serviceName'),
Added: incubator/ambari/trunk/ambari-web/app/models/service/flume.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/models/service/flume.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/models/service/flume.js (added)
+++ incubator/ambari/trunk/ambari-web/app/models/service/flume.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,98 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.FlumeService = App.Service.extend({
+ version: DS.attr('string'),
+ nodes: DS.hasMany('App.FlumeNode'),
+ channelsCount: function () {
+ var nodes = this.get('nodes');
+ var count = 0;
+ nodes.forEach(function (node) {
+ count += node.get('channelsCount');
+ });
+ return count;
+ }.property('nodes.@each.channelsCount'),
+
+ sourcesCount: function () {
+ var nodes = this.get('nodes');
+ var count = 0;
+ nodes.forEach(function (node) {
+ count += node.get('sourcesCount');
+ });
+ return count;
+ }.property('nodes.@each.sourcesCount'),
+
+ sinksCount: function () {
+ var nodes = this.get('nodes');
+ var count = 0;
+ nodes.forEach(function (node) {
+ count += node.get('sinksCount');
+ });
+ return count;
+ }.property('nodes.@each.sinksCount')
+});
+
+App.FlumeNode = DS.Model.extend({
+ host: DS.belongsTo('App.Host'),
+
+ /**
+ * A comma separated list of channels.
+ */
+ channels: DS.attr('string'),
+
+ /**
+ * A comma separated list of sources.
+ */
+ sources: DS.attr('string'),
+
+ /**
+ * A comma separated list of sinks.
+ */
+ sinks: DS.attr('string'),
+
+ channelsCount: function () {
+ var channels = this.get('channels');
+ if (!channels) {
+ return 0;
+ } else {
+ return channels.split(',').length;
+ }
+ }.property('channels'),
+
+ sourcesCount: function () {
+ var sources = this.get('sources');
+ if (!sources) {
+ return 0;
+ } else {
+ return sources.split(',').length;
+ }
+ }.property('sources'),
+
+ sinksCount: function () {
+ var sinks = this.get('sinks');
+ if (!sinks) {
+ return 0;
+ } else {
+ return sinks.split(',').length;
+ }
+ }.property('sinks')
+});
+
+App.FlumeService.FIXTURES = [];
+App.FlumeNode.FIXTURES = [];
Added: incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/flume.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/flume.hbs?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/flume.hbs (added)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/dashboard/service/flume.hbs Thu Jun 20 18:09:29 2013
@@ -0,0 +1,98 @@
+{{!
+* 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.
+}}
+
+{{#unless view.showOnlyRows}}
+<div class="clearfix like_pointer" {{action toggleInfoView target="view"}}>
+ <div class="name span2">
+ {{#if view.isCollapsed}}
+ <i class="icon-caret-down pull-left"></i>
+ {{else}}
+ <i class="icon-caret-right pull-left"></i>
+ {{/if}}
+ {{view App.MainDashboardServiceHealthView serviceBinding="view.service"}}
+ <a {{action selectService view.service href=true}}>{{view.service.displayName}}</a>
+ {{#if view.criticalAlertsCount}}
+ <a href="#" class="label label-important" {{action "showAlertsPopup" view.service target="view.parentView"}}>
+ {{view.criticalAlertsCount}}
+ </a>
+ {{/if}}
+ </div>
+ <div class="summary span">
+ {{view.summaryHeader}}
+ </div>
+</div>
+<div class="service-body">
+ <div class="span4">
+ <table class="table no-borders">
+ <tbody>
+ {{/unless}}
+ <!-- Flume Agents -->
+ <tr>
+ <td>{{t dashboard.services.flume.agentsLabel}}</td>
+ <td>
+ <a href="#" {{action filterHosts view.flumeServerComponent}}>{{view.summaryHeader}}</a>
+ </td>
+ </tr>
+ <!-- Channels -->
+ <tr>
+ <td>{{t dashboard.services.flume.channels}}</td>
+ <td>
+ {{view.service.channelsCount}} {{t dashboard.services.flume.channels}}
+ <ul>
+ {{#each view.service.nodes}}
+ {{#if channelsCount}}
+ <li> {{channels}} <a href="#" {{action showDetails host}}>{{host.publicHostName}}</a></li>
+ {{/if}}
+ {{/each}}
+ </ul>
+ </td>
+ </tr>
+ <!-- Sources -->
+ <tr>
+ <td>{{t dashboard.services.flume.sources}}</td>
+ <td>
+ {{view.service.sourcesCount}} {{t dashboard.services.flume.sources}}
+ <ul>
+ {{#each view.service.nodes}}
+ {{#if sourcesCount}}
+ <li> {{sources}} <a href="#" {{action showDetails host}}>{{host.publicHostName}}</a></li>
+ {{/if}}
+ {{/each}}
+ </ul>
+ </td>
+ </tr>
+ <!-- Sinks -->
+ <tr>
+ <td>{{t dashboard.services.flume.sinks}}</td>
+ <td>
+ {{view.service.sinksCount}} {{t dashboard.services.flume.sinks}}
+ <ul>
+ {{#each view.service.nodes}}
+ {{#if sinksCount}}
+ <li> {{sinks}} <a href="#" {{action showDetails host}}>{{host.publicHostName}}</a></li>
+ {{/if}}
+ {{/each}}
+ </ul>
+ </td>
+ </tr>
+ {{#unless view.showOnlyRows}}
+ </tbody>
+ </table>
+ </div>
+</div>
+{{/unless}}
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/service/info/summary.hbs Thu Jun 20 18:09:29 2013
@@ -49,23 +49,25 @@
{{#unless view.serviceStatus.ganglia}}
{{#unless view.serviceStatus.hue}}
{{#unless view.serviceStatus.mapreduce2}}
- {{#each component in view.components}}
- <tr>
- {{#if component.isMaster}}
- <td class="summary-label">{{component.displayName}}</td>
- <td><a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a></td>
- {{else}}
- <td class="summary-label">{{component.displayName}}s</td>
- <td><a {{action filterHosts component}} href="javascript:void(null)">{{component.displayName}}s</a></td>
- {{/if}}
- </tr>
- {{/each}}
- {{#if view.serviceStatus.nagios}}
- <tr>
- <td class="summary-label">{{t services.service.info.summary.nagiosWebUI}}</td>
- <td><a target=_blank href="http://{{unbound view.nagiosServer}}/nagios">{{view.nagiosServer}}/nagios</a></td>
- </tr>
- {{/if}}
+ {{#unless view.serviceStatus.flume}}
+ {{#each component in view.components}}
+ <tr>
+ {{#if component.isMaster}}
+ <td class="summary-label">{{component.displayName}}</td>
+ <td><a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a></td>
+ {{else}}
+ <td class="summary-label">{{component.displayName}}s</td>
+ <td><a {{action filterHosts component}} href="javascript:void(null)">{{component.displayName}}s</a></td>
+ {{/if}}
+ </tr>
+ {{/each}}
+ {{#if view.serviceStatus.nagios}}
+ <tr>
+ <td class="summary-label">{{t services.service.info.summary.nagiosWebUI}}</td>
+ <td><a target=_blank href="http://{{unbound view.nagiosServer}}/nagios">{{view.nagiosServer}}/nagios</a></td>
+ </tr>
+ {{/if}}
+ {{/unless}}
{{/unless}}
{{/unless}}
{{/unless}}
@@ -102,6 +104,9 @@
{{#if view.serviceStatus.hue}}
{{template "templates/main/service/info/summary/hue"}}
{{/if}}
+ {{#if view.serviceStatus.flume}}
+ {{view App.MainDashboardServiceFlumeView showOnlyRows=true serviceBinding="view.service"}}
+ {{/if}}
</tbody>
</table>
{{!view view.moreStatsView}}
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/service/item.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/service/item.hbs?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/service/item.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/service/item.hbs Thu Jun 20 18:09:29 2013
@@ -35,16 +35,21 @@
</ul>
</div>
{{/if}}
- <a href="javascript:void(null)" {{bindAttr class=":btn controller.isStartDisabled:disabled:btn-success" }}
- data-toggle="modal" {{action "startService" target="controller"}}>
- <i class="icon-play"></i>
- {{t services.service.start}}
- </a>
- <a href="javascript:void(null)" {{bindAttr class=":btn controller.isStopDisabled:disabled:btn-danger" }}
- data-toggle="modal" {{action "stopService" target="controller"}}>
- <i class="icon-stop icon-white"></i>
- {{t services.service.stop}}
- </a>
+ {{#if controller.isServiceRestartable}}
+ <a href="javascript:void(null)" {{bindAttr class=":btn controller.isStartDisabled:disabled:btn-success" }}
+ data-toggle="modal" {{action "startService" target="controller"}}>
+ <i class="icon-play"></i>
+ {{t services.service.start}}
+ </a>
+ <a href="javascript:void(null)" {{bindAttr class=":btn controller.isStopDisabled:disabled:btn-danger" }}
+ data-toggle="modal" {{action "stopService" target="controller"}}>
+ <i class="icon-stop icon-white"></i>
+ {{t services.service.stop}}
+ </a>
+ {{else}}
+ <span> </span>
+ {{/if}}
+ </span>
</div>
{{/if}}
{{outlet}}
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-web/app/utils/ajax.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/ajax.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/ajax.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/ajax.js Thu Jun 20 18:09:29 2013
@@ -239,6 +239,51 @@ var urls = {
};
}
},
+ 'service.metrics.flume.channel_fill_percent': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelFillPercentage[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/channelFillPct.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.channel_size': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/CHANNEL/*/ChannelSize[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/channelSize.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.sink_drain_success': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SINK/*/EventDrainSuccessCount[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/sinkDrainSuccessCount.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.sink_connection_failed': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SINK/*/ConnectionFailedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/sinkConnectionFailedCount.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.gc': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/jvmGcTime.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.jvm_heap_used': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/memHeapUsedM[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/jvmMemHeapUsedM.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.jvm_threads_runnable': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/jvm/threadsRunnable[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/jvmThreadsRunnable.json',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.cpu_user': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/cpu/cpu_user[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '',
+ 'testInProduction': true
+ },
+ 'service.metrics.flume.source_accepted': {
+ 'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_SERVER?fields=host_components/metrics/flume/flume/SOURCE/*/EventAcceptedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
+ 'mock': '/data/services/metrics/flume/sourceEventAccepted.json',
+ 'testInProduction': true
+ },
'service.metrics.hbase.cluster_requests': {
'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/cluster_requests[{fromSeconds},{toSeconds},{stepSeconds}]',
'mock': '/data/services/metrics/hbase/cluster_requests.json',
@@ -824,4 +869,4 @@ App.ajax = {
}
return $.ajax(opt);
}
-}
\ No newline at end of file
+}
Modified: incubator/ambari/trunk/ambari-web/app/utils/helper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/utils/helper.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/utils/helper.js (original)
+++ incubator/ambari/trunk/ambari-web/app/utils/helper.js Thu Jun 20 18:09:29 2013
@@ -352,6 +352,8 @@ App.format = {
return 'HCFS Client';
case 'HCFS_SERVICE_CHECK':
return 'HCFS Service Check';
+ case 'FLUME_SERVER':
+ return 'Flume Agent';
}
},
@@ -367,4 +369,4 @@ App.format = {
taskStatus:function (_taskStatus) {
return _taskStatus.toLowerCase();
}
-};
\ No newline at end of file
+};
Modified: incubator/ambari/trunk/ambari-web/app/views.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views.js Thu Jun 20 18:09:29 2013
@@ -80,6 +80,7 @@ require('views/main/dashboard/service/hb
require('views/main/dashboard/service/hive');
require('views/main/dashboard/service/zookeeper');
require('views/main/dashboard/service/oozie');
+require('views/main/dashboard/service/flume');
require('views/main/dashboard/cluster_metrics/cpu');
require('views/main/dashboard/cluster_metrics/load');
require('views/main/dashboard/cluster_metrics/memory');
@@ -139,6 +140,15 @@ require('views/main/service/info/metrics
require('views/main/service/info/metrics/hbase/regionserver_queuesize');
require('views/main/service/info/metrics/hbase/hlog_split_time');
require('views/main/service/info/metrics/hbase/hlog_split_size');
+require('views/main/service/info/metrics/flume/channel_fill_pct');
+require('views/main/service/info/metrics/flume/channel_size');
+require('views/main/service/info/metrics/flume/sink_drain_success');
+require('views/main/service/info/metrics/flume/source_accepted');
+require('views/main/service/info/metrics/flume/sink_connection_failed');
+require('views/main/service/info/metrics/flume/gc');
+require('views/main/service/info/metrics/flume/jvm_heap');
+require('views/main/service/info/metrics/flume/jvm_threads_runnable');
+require('views/main/service/info/metrics/flume/cpu_user');
require('views/main/service/add_view');
require('views/main/service/reassign_view');
require('views/main/charts/menu');
Added: incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/flume.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/flume.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/flume.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/dashboard/service/flume.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,36 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+var date = require('utils/date');
+
+App.MainDashboardServiceFlumeView = App.MainDashboardServiceView.extend({
+ templateName: require('templates/main/dashboard/service/flume'),
+ serviceName: 'flume',
+
+ summaryHeader: function () {
+ var count = this.get('service.nodes.length');
+ if(count==1)
+ return this.t("dashboard.services.flume.summary.single").format(count);
+ return this.t("dashboard.services.flume.summary.multiple").format(count);
+ }.property('service.nodes'),
+
+ flumeServerComponent: function () {
+ return App.HostComponent.find().findProperty('componentName', 'FLUME_SERVER');
+ }.property()
+
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_ChannelFillPercent = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-channel-fill-percent",
+ title: Em.I18n.t('services.service.info.metrics.flume.channelFillPercent'),
+ yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter,
+
+ ajaxIndex: 'service.metrics.flume.channel_fill_percent',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.flume && hc.metrics.flume.flume && hc.metrics.flume.flume.CHANNEL) {
+ for ( var cname in hc.metrics.flume.flume.CHANNEL) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.channelName').format(cname + " (" + hostName + ")");
+ var seriesData = hc.metrics.flume.flume.CHANNEL[cname]['ChannelFillPercentage'];
+ if (seriesData) {
+ seriesArray.push(self.transformData(seriesData, seriesName));
+ }
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_ChannelSize = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-channel-size",
+ title: Em.I18n.t('services.service.info.metrics.flume.channelSize'),
+
+ ajaxIndex: 'service.metrics.flume.channel_size',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.flume && hc.metrics.flume.flume && hc.metrics.flume.flume.CHANNEL) {
+ for ( var cname in hc.metrics.flume.flume.CHANNEL) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.channelName').format(cname + " (" + hostName + ")");
+ var seriesData = hc.metrics.flume.flume.CHANNEL[cname]['ChannelSize'];
+ if (seriesData) {
+ seriesArray.push(self.transformData(seriesData, seriesName));
+ }
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/cpu_user.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/cpu_user.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/cpu_user.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/cpu_user.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_CPUUser = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-cpu-user",
+ title: Em.I18n.t('services.service.info.metrics.flume.cpu.user'),
+ yAxisFormatter: App.ChartLinearTimeView.PercentageFormatter,
+ renderer: 'line',
+
+ ajaxIndex: 'service.metrics.flume.cpu_user',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.cpu && hc.metrics.cpu.cpu_user) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.hostName').format(hostName);
+ var seriesData = hc.metrics.cpu.cpu_user;
+ if (seriesData) {
+ seriesArray.push(self.transformData(seriesData, seriesName));
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/gc.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/gc.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/gc.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/gc.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_GarbageCollection = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-jvm-gc",
+ title: Em.I18n.t('services.service.info.metrics.flume.gc'),
+ yAxisFormatter: App.ChartLinearTimeView.TimeElapsedFormatter,
+
+ ajaxIndex: 'service.metrics.flume.gc',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.jvm && hc.metrics.jvm.gcTimeMillis) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.hostName').format(hostName);
+ var seriesData = hc.metrics.jvm.gcTimeMillis;
+ if (seriesData) {
+ seriesArray.push(self.transformData(seriesData, seriesName));
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_heap.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_heap.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_heap.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_heap.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,63 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_JVMHeapUsed = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-jvm-heap-used",
+ title: Em.I18n.t('services.service.info.metrics.flume.jvmHeapUsed'),
+ yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
+ renderer: 'line',
+
+ ajaxIndex: 'service.metrics.flume.jvm_heap_used',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ var MB = Math.pow(2, 20);
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.jvm && hc.metrics.jvm.memHeapUsedM) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.hostName').format(hostName);
+ var seriesData = hc.metrics.jvm.memHeapUsedM;
+ if (seriesData) {
+ var s = self.transformData(seriesData, seriesName);
+ for (var i = 0; i < s.data.length; i++) {
+ s.data[i].y *= MB;
+ }
+ seriesArray.push(s);
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_threads_runnable.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_threads_runnable.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_threads_runnable.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/jvm_threads_runnable.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_JVMThreadsRunnable = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-jvm-threads-runnable",
+ title: Em.I18n.t('services.service.info.metrics.flume.jvmThreadsRunnable'),
+ renderer: 'line',
+
+ ajaxIndex: 'service.metrics.flume.jvm_threads_runnable',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ var MB = Math.pow(2, 20);
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.jvm && hc.metrics.jvm.threadsRunnable) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.hostName').format(hostName);
+ var seriesData = hc.metrics.jvm.threadsRunnable;
+ if (seriesData) {
+ var s = self.transformData(seriesData, seriesName);
+ seriesArray.push(s);
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_SinkConnectionFailedCount = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-sink-connection-failed",
+ title: Em.I18n.t('services.service.info.metrics.flume.sinkConnectionFailed'),
+
+ ajaxIndex: 'service.metrics.flume.sink_connection_failed',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.flume && hc.metrics.flume.flume && hc.metrics.flume.flume.SINK) {
+ for ( var cname in hc.metrics.flume.flume.SINK) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.sinkName').format(cname + " (" + hostName + ")");
+ var seriesData = hc.metrics.flume.flume.SINK[cname]['ConnectionFailedCount'];
+ if (seriesData) {
+ seriesArray.push(self.transformData(seriesData, seriesName));
+ }
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_SinkDrainSuccessCount = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-sink-drain-success",
+ title: Em.I18n.t('services.service.info.metrics.flume.sinkDrainSuccess'),
+
+ ajaxIndex: 'service.metrics.flume.sink_drain_success',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.flume && hc.metrics.flume.flume && hc.metrics.flume.flume.SINK) {
+ for ( var cname in hc.metrics.flume.flume.SINK) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.sinkName').format(cname + " (" + hostName + ")");
+ var seriesData = hc.metrics.flume.flume.SINK[cname]['EventDrainSuccessCount'];
+ if (seriesData) {
+ seriesArray.push(self.transformData(seriesData, seriesName));
+ }
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Added: incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js?rev=1495115&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js (added)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js Thu Jun 20 18:09:29 2013
@@ -0,0 +1,58 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+/**
+ * @class
+ *
+ * This is a view for showing HBase Cluster Requests
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_SourceAcceptedCount = App.ChartLinearTimeView.extend({
+ id: "service-metrics-flume-source-accepted",
+ title: Em.I18n.t('services.service.info.metrics.flume.sourceAccepted'),
+
+ ajaxIndex: 'service.metrics.flume.source_accepted',
+
+ transformToSeries: function (jsonData) {
+ var seriesArray = [];
+ var self = this;
+ if (jsonData && jsonData.host_components) {
+ jsonData.host_components.forEach(function (hc) {
+ var hostName = hc.HostRoles.host_name;
+ var host = App.Host.find(hostName);
+ if (host && host.get('publicHostName')) {
+ hostName = host.get('publicHostName');
+ }
+ if (hc.metrics && hc.metrics.flume && hc.metrics.flume.flume && hc.metrics.flume.flume.SOURCE) {
+ for ( var cname in hc.metrics.flume.flume.SOURCE) {
+ var seriesName = Em.I18n.t('services.service.info.metrics.flume.sourceName').format(cname + " (" + hostName + ")");
+ var seriesData = hc.metrics.flume.flume.SOURCE[cname]['EventAcceptedCount'];
+ if (seriesData) {
+ seriesArray.push(self.transformData(seriesData, seriesName));
+ }
+ }
+ }
+ });
+ }
+ return seriesArray;
+ }
+});
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/info/summary.js Thu Jun 20 18:09:29 2013
@@ -44,7 +44,8 @@ App.MainServiceInfoSummaryView = Em.View
hive:false,
ganglia:false,
nagios:false,
- hue: false
+ hue: false,
+ flume: false
},
clients: function () {
@@ -72,7 +73,7 @@ App.MainServiceInfoSummaryView = Em.View
servers: function () {
var result = [];
var service = this.get('controller.content');
- if (service.get("id") == "ZOOKEEPER") {
+ if (service.get("id") == "ZOOKEEPER" || service.get("id") == "FLUME") {
var servers = service.get('hostComponents').filterProperty('isMaster');
if (servers.length > 0) {
result = [{
@@ -134,7 +135,7 @@ App.MainServiceInfoSummaryView = Em.View
*/
serversHost: function() {
var service = this.get('controller.content');
- if (service.get("id") == "ZOOKEEPER") {
+ if (service.get("id") == "ZOOKEEPER" || service.get("id") == "FLUME") {
var servers = service.get('hostComponents').filterProperty('isMaster');
if (servers.length > 0) {
return servers[0];
@@ -253,6 +254,9 @@ App.MainServiceInfoSummaryView = Em.View
case 'hbase':
svc = App.HBaseService.find().objectAt(0);
break;
+ case 'flume':
+ svc = App.FlumeService.find().objectAt(0);
+ break;
default:
break;
}
@@ -315,6 +319,17 @@ App.MainServiceInfoSummaryView = Em.View
[App.ChartServiceMetricsHBASE_HlogSplitTime.extend(),
App.ChartServiceMetricsHBASE_HlogSplitSize.extend()]];
break;
+ case 'flume':
+ graphs = [[App.ChartServiceMetricsFlume_ChannelFillPercent.extend(),
+ App.ChartServiceMetricsFlume_ChannelSize.extend(),
+ App.ChartServiceMetricsFlume_SourceAcceptedCount.extend(),
+ App.ChartServiceMetricsFlume_SinkDrainSuccessCount.extend()],
+ [App.ChartServiceMetricsFlume_SinkConnectionFailedCount.extend(),
+ //App.ChartServiceMetricsFlume_GarbageCollection.extend(),
+ //App.ChartServiceMetricsFlume_JVMHeapUsed.extend(),
+ //App.ChartServiceMetricsFlume_JVMThreadsRunnable.extend(),
+ App.ChartServiceMetricsFlume_CPUUser.extend()]];
+ break;
default:
break;
}
@@ -417,4 +432,4 @@ App.MainServiceInfoSummaryView = Em.View
return names.length ? names.join(', ') : false;
}.property('clientComponents')
-});
\ No newline at end of file
+});
Modified: incubator/ambari/trunk/ambari-web/app/views/main/service/item.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/service/item.js?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/service/item.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/service/item.js Thu Jun 20 18:09:29 2013
@@ -54,6 +54,8 @@ App.MainServiceItemView = Em.View.extend
case 'HUE':
options.push({action: 'runSmokeTest', 'label': Em.I18n.t('services.service.actions.run.smoke')});
break;
+ case 'FLUME':
+ break;
default:
var components = this.get('controller.content.hostComponents');
options.push({action: 'runSmokeTest', 'label': Em.I18n.t('services.service.actions.run.smoke')});
@@ -75,4 +77,4 @@ App.MainServiceItemView = Em.View.extend
didInsertElement: function () {
this.get('controller').setStartStopState();
}
-});
\ No newline at end of file
+});
Modified: incubator/ambari/trunk/contrib/addons/src/addOns/nagios/scripts/nagios_alerts.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/contrib/addons/src/addOns/nagios/scripts/nagios_alerts.php?rev=1495115&r1=1495114&r2=1495115&view=diff
==============================================================================
--- incubator/ambari/trunk/contrib/addons/src/addOns/nagios/scripts/nagios_alerts.php (original)
+++ incubator/ambari/trunk/contrib/addons/src/addOns/nagios/scripts/nagios_alerts.php Thu Jun 20 18:09:29 2013
@@ -385,6 +385,9 @@ function hdp_mon_generate_response( $res
break;
case "AMBARI":
$pieces[0] = "AMBARI";
+ break;
+ case "FLUME":
+ $pieces[0] = "FLUME";
break;
case "NAGIOS":
case "HDFS":