You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/08/01 16:59:19 UTC

git commit: AMBARI-6711. Provide accurate Flume service level metric graphs (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 45ded7210 -> 7a3585fb4


AMBARI-6711. Provide accurate Flume service level metric graphs (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 7a3585fb4222fbffc8186e198d42c1b249574261
Parents: 45ded72
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Aug 1 17:56:13 2014 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Aug 1 17:56:13 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                      | 16 ++---
 ambari-web/app/utils/ajax/ajax.js               | 28 ++-------
 ambari-web/app/views.js                         | 11 ++--
 .../info/metrics/flume/channel_fill_pct.js      | 59 ------------------
 .../service/info/metrics/flume/channel_size.js  | 58 ------------------
 .../info/metrics/flume/channel_size_mma.js      | 64 ++++++++++++++++++++
 .../service/info/metrics/flume/channel_sum.js   | 48 +++++++++++++++
 .../info/metrics/flume/flume_incoming_mma.js    | 64 ++++++++++++++++++++
 .../info/metrics/flume/flume_incoming_sum.js    | 46 ++++++++++++++
 .../info/metrics/flume/flume_outgoing_mma.js    | 64 ++++++++++++++++++++
 .../info/metrics/flume/flume_outgoing_sum.js    | 46 ++++++++++++++
 .../metrics/flume/sink_connection_failed.js     | 58 ------------------
 .../info/metrics/flume/sink_drain_success.js    | 58 ------------------
 .../info/metrics/flume/source_accepted.js       | 58 ------------------
 .../app/views/main/service/info/summary.js      | 13 ++--
 15 files changed, 360 insertions(+), 331 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index de0d13f..9e473fd 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1192,17 +1192,19 @@ Em.I18n.translations = {
   'services.service.summary.flume.start.context': 'Start Flume Agent {0}',
   'services.service.summary.flume.noAgents': 'No Flume Agents to display',
 
-  '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.channelSizeMMA':'Channel size Min/Max/Avg',
+  'services.service.info.metrics.flume.channelSizeSum':'Channel Size Sum',
+  'services.service.info.metrics.flume.incoming.mma':'Incoming Min/Max/Avg',
+  'services.service.info.metrics.flume.incoming.sum':'Incoming Sum',
+  'services.service.info.metrics.flume.outgoing.mma':'Outgoing Min/Max/Avg',
+  'services.service.info.metrics.flume.outgoing.sum':'Outgoing Sum',
   '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.channelType':'Channel size {0}',
+  'services.service.info.metrics.flume.incoming_mma':'Incoming {0}',
+  'services.service.info.metrics.flume.outgoing_mma':'Outgoing {0}',
   'services.service.info.metrics.flume.sourceName':'Source {0}',
   'services.service.info.metrics.flume.hostName':'Host: {0}',
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 041db0c..aa45fd3 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -486,25 +486,8 @@ var urls = {
     'real': '/clusters/{clusterName}/services/{serviceName}/components/{componentName}?fields=host_components/{metricName}',
     'mock': '/data/cluster_metrics/cpu_1hr.json'
   },
-  'service.metrics.flume.channel_fill_percent': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?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_HANDLER?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_HANDLER?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_HANDLER?fields=host_components/metrics/flume/flume/SINK/*/ConnectionFailedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
-    'mock': '/data/services/metrics/flume/sinkConnectionFailedCount.json',
-    'testInProduction': true
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=metrics/flume/flume/CHANNEL/ChannelSize/_sum[{fromSeconds},{toSeconds},{stepSeconds}]'
   },
   'service.metrics.flume.gc': {
     'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/jvm/gcTimeMillis[{fromSeconds},{toSeconds},{stepSeconds}]',
@@ -526,10 +509,11 @@ var urls = {
     'mock': '',
     'testInProduction': true
   },
-  'service.metrics.flume.source_accepted': {
-    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=host_components/metrics/flume/flume/SOURCE/*/EventAcceptedCount[{fromSeconds},{toSeconds},{stepSeconds}]',
-    'mock': '/data/services/metrics/flume/sourceEventAccepted.json',
-    'testInProduction': true
+  'service.metrics.flume.incoming_event_put_successCount': {
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=metrics/flume/flume/CHANNEL/EventPutSuccessCount/rate[{fromSeconds},{toSeconds},{stepSeconds}]'
+  },
+  'service.metrics.flume.outgoing_event_take_success_count': {
+    'real': '/clusters/{clusterName}/services/FLUME/components/FLUME_HANDLER?fields=metrics/flume/flume/CHANNEL/EventTakeSuccessCount/rate[{fromSeconds},{toSeconds},{stepSeconds}]'
   },
   'service.metrics.hbase.cluster_requests': {
     'real': '/clusters/{clusterName}/services/HBASE/components/HBASE_MASTER?fields=metrics/hbase/master/cluster_requests[{fromSeconds},{toSeconds},{stepSeconds}]',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index 1e6d266..828b5c1 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -206,11 +206,12 @@ require('views/main/service/info/metrics/hbase/regionserver_regions');
 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/channel_sum');
+require('views/main/service/info/metrics/flume/channel_size_mma');
+require('views/main/service/info/metrics/flume/flume_incoming_sum');
+require('views/main/service/info/metrics/flume/flume_incoming_mma');
+require('views/main/service/info/metrics/flume/flume_outgoing_sum');
+require('views/main/service/info/metrics/flume/flume_outgoing_mma');
 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');

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js b/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js
deleted file mode 100644
index 2a1424b..0000000
--- a/ambari-web/app/views/main/service/info/metrics/flume/channel_fill_pct.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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;
-  }
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js b/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js
deleted file mode 100644
index 8f3e30a..0000000
--- a/ambari-web/app/views/main/service/info/metrics/flume/channel_size.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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;
-  }
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/channel_size_mma.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/channel_size_mma.js b/ambari-web/app/views/main/service/info/metrics/flume/channel_size_mma.js
new file mode 100644
index 0000000..9ce9f0a
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/flume/channel_size_mma.js
@@ -0,0 +1,64 @@
+/**
+ * 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_ChannelSizeMMA = App.ChartLinearTimeView.extend({
+  id: "service-metrics-flume-channel-size-mma",
+  title: Em.I18n.t('services.service.info.metrics.flume.channelSizeMMA'),
+  yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
+  renderer: 'line',
+  ajaxIndex: 'service.metrics.flume.channel_size',
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    var self = this;
+
+    if (Em.get(jsonData, "metrics.flume.flume.CHANNEL.ChannelSize")) {
+      for ( var cname in jsonData.metrics.flume.flume.CHANNEL.ChannelSize) {
+        if(cname != "sum"){
+          var seriesName = Em.I18n.t('services.service.info.metrics.flume.channelType').format(cname);
+          var seriesData = jsonData.metrics.flume.flume.CHANNEL.ChannelSize[cname];
+          if (seriesData) {
+            seriesArray.push(self.transformData(seriesData, seriesName));
+          }
+        }
+      }
+    }
+    return seriesArray;
+  },
+
+  colorForSeries: function (series) {
+    if (Em.I18n.t('services.service.info.metrics.flume.channelType').format("avg") == series.name){
+      return '#0066b3';
+    }else if (Em.I18n.t('services.service.info.metrics.flume.channelType').format("min") == series.name){
+      return '#00CC00';
+    }else if (Em.I18n.t('services.service.info.metrics.flume.channelType').format("max") == series.name){
+      return '#FF8000';
+    }
+    return null;
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/channel_sum.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/channel_sum.js b/ambari-web/app/views/main/service/info/metrics/flume/channel_sum.js
new file mode 100644
index 0000000..5d818ea
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/flume/channel_sum.js
@@ -0,0 +1,48 @@
+/**
+ * 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
+ * 
+ *
+ * 
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_ChannelSizeSum = App.ChartLinearTimeView.extend({
+  id: "service-metrics-flume-channel-size-sum",
+  title: Em.I18n.t('services.service.info.metrics.flume.channelSizeSum'),
+  yAxisFormatter: App.ChartLinearTimeView.BytesFormatter,
+
+  ajaxIndex: 'service.metrics.flume.channel_size',
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    var self = this;
+    if(Em.get(jsonData, "metrics.flume.flume.CHANNEL.ChannelSize.sum")){
+      var seriesName = Em.I18n.t('services.service.info.metrics.flume.incoming.sum');
+      var seriesData = jsonData.metrics.flume.flume.CHANNEL.ChannelSize.sum;
+      if (seriesData) {
+        seriesArray.push(self.transformData(seriesData, seriesName));
+      }
+    }
+    return seriesArray;
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_mma.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_mma.js b/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_mma.js
new file mode 100644
index 0000000..82af153
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_mma.js
@@ -0,0 +1,64 @@
+/**
+ * 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
+ * 
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_IncommingMMA = App.ChartLinearTimeView.extend({
+  id: "service-metrics-flume-incoming_mma",
+  renderer: 'line',
+  title: Em.I18n.t('services.service.info.metrics.flume.incoming.mma'),
+
+  ajaxIndex: 'service.metrics.flume.incoming_event_put_successCount',
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    var self = this;
+
+    if (Em.get(jsonData, "metrics.flume.flume.CHANNEL.EventPutSuccessCount.rate")) {
+      for ( var cname in jsonData.metrics.flume.flume.CHANNEL.EventPutSuccessCount.rate) {
+        if(cname != "sum"){
+          var seriesName = Em.I18n.t('services.service.info.metrics.flume.incoming_mma').format(cname);
+          var seriesData = jsonData.metrics.flume.flume.CHANNEL.EventPutSuccessCount.rate[cname];
+          if (seriesData) {
+            seriesArray.push(self.transformData(seriesData, seriesName));
+          }
+        }
+      }
+    }
+    return seriesArray;
+  },
+
+  colorForSeries: function (series) {
+    var name = Em.I18n.t('services.service.info.metrics.flume.incoming_mma');
+    if (name.format("avg") == series.name){
+      return '#0066b3';
+    }else if (name.format("min") == series.name){
+      return '#00CC00';
+    }else if (name.format("max") == series.name){
+      return '#FF8000';
+    }
+    return null;
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_sum.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_sum.js b/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_sum.js
new file mode 100644
index 0000000..ba78d26
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/flume/flume_incoming_sum.js
@@ -0,0 +1,46 @@
+/**
+ * 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
+ *
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_IncommingSum = App.ChartLinearTimeView.extend({
+  id: "service-metrics-flume-incoming_sum",
+  title: Em.I18n.t('services.service.info.metrics.flume.incoming.sum'),
+
+  ajaxIndex: 'service.metrics.flume.incoming_event_put_successCount',
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    var self = this;
+    if(Em.get(jsonData, "metrics.flume.flume.CHANNEL.EventPutSuccessCount.rate.sum")){
+      var seriesName = Em.I18n.t('services.service.info.metrics.flume.channelSizeSum');
+      var seriesData = jsonData.metrics.flume.flume.CHANNEL.EventPutSuccessCount.rate.sum;
+      if (seriesData) {
+        seriesArray.push(self.transformData(seriesData, seriesName));
+      }
+    }
+    return seriesArray;
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_mma.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_mma.js b/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_mma.js
new file mode 100644
index 0000000..d0ccdf4
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_mma.js
@@ -0,0 +1,64 @@
+/**
+ * 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
+ *
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_OutgoingMMA = App.ChartLinearTimeView.extend({
+  id: "service-metrics-flume-outgoing_mma",
+  renderer: 'line',
+  title: Em.I18n.t('services.service.info.metrics.flume.outgoing.mma'),
+
+  ajaxIndex: 'service.metrics.flume.outgoing_event_take_success_count',
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    var self = this;
+
+    if (Em.get(jsonData, "metrics.flume.flume.CHANNEL.EventTakeSuccessCount.rate")) {
+      for ( var cname in jsonData.metrics.flume.flume.CHANNEL.EventTakeSuccessCount.rate) {
+        if(cname != "sum"){
+          var seriesName = Em.I18n.t('services.service.info.metrics.flume.outgoing_mma').format(cname);
+          var seriesData = jsonData.metrics.flume.flume.CHANNEL.EventTakeSuccessCount.rate[cname];
+          if (seriesData) {
+            seriesArray.push(self.transformData(seriesData, seriesName));
+          }
+        }
+      }
+    }
+    return seriesArray;
+  },
+
+  colorForSeries: function (series) {
+    var name = Em.I18n.t('services.service.info.metrics.flume.outgoing_mma');
+    if (name.format("avg") == series.name){
+      return '#0066b3';
+    }else if (name.format("min") == series.name){
+      return '#00CC00';
+    }else if (name.format("max") == series.name){
+      return '#FF8000';
+    }
+    return null;
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_sum.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_sum.js b/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_sum.js
new file mode 100644
index 0000000..34edbd4
--- /dev/null
+++ b/ambari-web/app/views/main/service/info/metrics/flume/flume_outgoing_sum.js
@@ -0,0 +1,46 @@
+/**
+ * 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
+ *
+ *
+ * @extends App.ChartLinearTimeView
+ * @extends Ember.Object
+ * @extends Ember.View
+ */
+App.ChartServiceMetricsFlume_OutgoingSum = App.ChartLinearTimeView.extend({
+  id: "service-metrics-flume-outgoing_sum",
+  title: Em.I18n.t('services.service.info.metrics.flume.outgoing.sum'),
+
+  ajaxIndex: 'service.metrics.flume.outgoing_event_take_success_count',
+
+  transformToSeries: function (jsonData) {
+    var seriesArray = [];
+    var self = this;
+    if(Em.get(jsonData, "metrics.flume.flume.CHANNEL.EventTakeSuccessCount.rate.sum")){
+      var seriesName = Em.I18n.t('services.service.info.metrics.flume.channelSizeSum');
+      var seriesData = jsonData.metrics.flume.flume.CHANNEL.EventTakeSuccessCount.rate.sum;
+      if (seriesData) {
+        seriesArray.push(self.transformData(seriesData, seriesName));
+      }
+    }
+    return seriesArray;
+  }
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js b/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js
deleted file mode 100644
index 2a0438d..0000000
--- a/ambari-web/app/views/main/service/info/metrics/flume/sink_connection_failed.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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;
-  }
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js b/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js
deleted file mode 100644
index 1a0ed75..0000000
--- a/ambari-web/app/views/main/service/info/metrics/flume/sink_drain_success.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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;
-  }
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js b/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js
deleted file mode 100644
index cd90462..0000000
--- a/ambari-web/app/views/main/service/info/metrics/flume/source_accepted.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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;
-  }
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a3585fb/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 4106c5a..ae4a814 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -302,12 +302,13 @@ App.MainServiceInfoSummaryView = Em.View.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(),
+          graphs = [[App.ChartServiceMetricsFlume_ChannelSizeMMA.extend(),
+             App.ChartServiceMetricsFlume_ChannelSizeSum.extend(),
+             App.ChartServiceMetricsFlume_IncommingMMA.extend(),
+             App.ChartServiceMetricsFlume_IncommingSum],
+             [App.ChartServiceMetricsFlume_OutgoingMMA,
+               App.ChartServiceMetricsFlume_OutgoingSum,
+             //App.ChartServiceMetricsFlume_GarbageCollection.extend(),
               //App.ChartServiceMetricsFlume_JVMHeapUsed.extend(),
               //App.ChartServiceMetricsFlume_JVMThreadsRunnable.extend(),
               App.ChartServiceMetricsFlume_CPUUser.extend()]];