ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject ambari git commit: AMBARI-19452 : Metrics of flume shows same values for all channels, sinks or sources in host. (wangjianfei via avijayan)
Date Sun, 12 Feb 2017 22:23:59 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5d695d83d -> 3a9519279


AMBARI-19452 : Metrics of flume shows same values for all channels,sinks or sources in host.
(wangjianfei via avijayan)


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

Branch: refs/heads/trunk
Commit: 3a9519279e3f3b9ba113fb1bc1d3241e6bd9f2a8
Parents: 5d695d8
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Sun Feb 12 14:23:54 2017 -0800
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Sun Feb 12 14:23:54 2017 -0800

----------------------------------------------------------------------
 .../controller/metrics/timeline/AMSPropertyProvider.java     | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3a951927/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
index f194f8e..759f595 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
@@ -441,6 +441,14 @@ public abstract class AMSPropertyProvider extends MetricsPropertyProvider
{
                   } else {
                     propertyId = substituteArgument(propertyId, "$1", metric.getInstanceId());
                   }
+                }else {
+                  if(metric.getInstanceId() != null){
+                    //instanceId "CHANNEL.ch1"
+                    String instanceId = metric.getInstanceId();
+                    instanceId = instanceId.matches("^\\w+\\..+$") ? instanceId.split("\\.")[1]:"";
+                    //propertyId "metrics/flume/flume/CHANNEL/ch1/[ChannelCapacity]"
+                    if(!propertyId.contains(instanceId)) continue;
+                  }
                 }
                 Object value = getValue(metric, temporalInfo);
                 if (value != null && !containsArguments(propertyId)) {


Mime
View raw message