kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch 2.5 updated: MINOR: Remove tag from metric to measure process-rate on source nodes (#8175)
Date Thu, 27 Feb 2020 17:04:30 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch 2.5
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.5 by this push:
     new 5413675  MINOR: Remove tag from metric to measure process-rate on source nodes (#8175)
5413675 is described below

commit 54136758a54d0750b91181541135c47f78bd907e
Author: Bruno Cadonna <bruno@confluent.io>
AuthorDate: Thu Feb 27 00:33:18 2020 +0100

    MINOR: Remove tag from metric to measure process-rate on source nodes (#8175)
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../kafka/streams/processor/internals/metrics/ProcessorNodeMetrics.java | 2 +-
 .../org/apache/kafka/streams/processor/internals/SourceNodeTest.java    | 2 +-
 .../streams/processor/internals/metrics/ProcessorNodeMetricsTest.java   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetrics.java
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetrics.java
index a1c2d04..b495f7f 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetrics.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetrics.java
@@ -137,7 +137,7 @@ public class ProcessorNodeMetrics {
         addInvocationRateAndCountToSensor(
             parentSensor,
             TASK_LEVEL_GROUP,
-            streamsMetrics.nodeLevelTagMap(threadId, taskId, ROLLUP_VALUE),
+            streamsMetrics.taskLevelTagMap(threadId, taskId),
             PROCESS,
             PROCESS_RATE_DESCRIPTION,
             PROCESS_TOTAL_DESCRIPTION
diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/SourceNodeTest.java
b/streams/src/test/java/org/apache/kafka/streams/processor/internals/SourceNodeTest.java
index 97dec8f..32ba4fb 100644
--- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/SourceNodeTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/SourceNodeTest.java
@@ -112,8 +112,8 @@ public class SourceNodeTest {
             assertTrue(StreamsTestUtils.containsMetric(metrics, "process-total", groupName,
metricTags));
 
             // test parent sensors
-            metricTags.put("processor-node-id", StreamsMetricsImpl.ROLLUP_VALUE);
             final String parentGroupName = "stream-task-metrics";
+            metricTags.remove("processor-node-id");
             assertTrue(StreamsTestUtils.containsMetric(metrics, "process-rate", parentGroupName,
metricTags));
             assertTrue(StreamsTestUtils.containsMetric(metrics, "process-total", parentGroupName,
metricTags));
 
diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetricsTest.java
b/streams/src/test/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetricsTest.java
index 6926ec4..9778db8 100644
--- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetricsTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/metrics/ProcessorNodeMetricsTest.java
@@ -121,7 +121,7 @@ public class ProcessorNodeMetricsTest {
         final String descriptionOfRate = "The average number of calls to process per second";
         expect(streamsMetrics.taskLevelSensor(THREAD_ID, TASK_ID, metricNamePrefix, RecordingLevel.DEBUG))
             .andReturn(expectedParentSensor);
-        expect(streamsMetrics.nodeLevelTagMap(THREAD_ID, TASK_ID, StreamsMetricsImpl.ROLLUP_VALUE))
+        expect(streamsMetrics.taskLevelTagMap(THREAD_ID, TASK_ID))
             .andReturn(parentTagMap);
         StreamsMetricsImpl.addInvocationRateAndCountToSensor(
             expectedParentSensor,


Mime
View raw message