Repository: storm
Updated Branches:
  refs/heads/master 15845336f -> 94dab8d9f


STORM-2775 Update kafkaPartition metrics to match the same format as kafkaOffset

(cherry picked from commit 8db4e90)


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

Branch: refs/heads/master
Commit: f9747ef0d74db9567a5f2d73560c09f344c94d7e
Parents: a66c4a5
Author: Kevin Conaway <[email protected]>
Authored: Thu Oct 12 14:48:30 2017 -0400
Committer: Kevin Conaway <[email protected]>
Committed: Thu Oct 12 16:26:43 2017 -0400

----------------------------------------------------------------------
 .../jvm/org/apache/storm/kafka/PartitionManager.java  | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/f9747ef0/external/storm-kafka/src/jvm/org/apache/storm/kafka/PartitionManager.java
----------------------------------------------------------------------
diff --git 
a/external/storm-kafka/src/jvm/org/apache/storm/kafka/PartitionManager.java 
b/external/storm-kafka/src/jvm/org/apache/storm/kafka/PartitionManager.java
index 5ff506e..4b5f456 100644
--- a/external/storm-kafka/src/jvm/org/apache/storm/kafka/PartitionManager.java
+++ b/external/storm-kafka/src/jvm/org/apache/storm/kafka/PartitionManager.java
@@ -166,13 +166,15 @@ public class PartitionManager {
     }
 
     public Map getMetricsDataMap() {
+        String metricPrefix = _partition.getId();
+
         Map<String, Object> ret = new HashMap<>();
-        ret.put(_partition + "/fetchAPILatencyMax", 
_fetchAPILatencyMax.getValueAndReset());
-        ret.put(_partition + "/fetchAPILatencyMean", 
_fetchAPILatencyMean.getValueAndReset());
-        ret.put(_partition + "/fetchAPICallCount", 
_fetchAPICallCount.getValueAndReset());
-        ret.put(_partition + "/fetchAPIMessageCount", 
_fetchAPIMessageCount.getValueAndReset());
-        ret.put(_partition + "/lostMessageCount", 
_lostMessageCount.getValueAndReset());
-        ret.put(_partition + "/messageIneligibleForRetryCount", 
_messageIneligibleForRetryCount.getValueAndReset());
+        ret.put(metricPrefix + "/fetchAPILatencyMax", 
_fetchAPILatencyMax.getValueAndReset());
+        ret.put(metricPrefix + "/fetchAPILatencyMean", 
_fetchAPILatencyMean.getValueAndReset());
+        ret.put(metricPrefix + "/fetchAPICallCount", 
_fetchAPICallCount.getValueAndReset());
+        ret.put(metricPrefix + "/fetchAPIMessageCount", 
_fetchAPIMessageCount.getValueAndReset());
+        ret.put(metricPrefix + "/lostMessageCount", 
_lostMessageCount.getValueAndReset());
+        ret.put(metricPrefix + "/messageIneligibleForRetryCount", 
_messageIneligibleForRetryCount.getValueAndReset());
         return ret;
     }
 

Reply via email to