kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guozhang Wang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-7734) Metrics tags should use LinkedHashMap to guarantee ordering
Date Fri, 04 Jan 2019 01:15:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-7734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Guozhang Wang resolved KAFKA-7734.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.0

> Metrics tags should use LinkedHashMap to guarantee ordering
> -----------------------------------------------------------
>
>                 Key: KAFKA-7734
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7734
>             Project: Kafka
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Guozhang Wang
>            Assignee: lambdaliu
>            Priority: Major
>             Fix For: 2.2.0
>
>
> Today we store metrics tags inside MetricName from various places, and many of them are
using `HashMap`. However, for metrics reporters like JMXReporter, the mBeanName is constructed
by looping over `metricName.tags().entrySet()` which does not guarantee ordering. This resulted
a few places where the mBeanName string not as expected, e.g. we document the Streams cache
metrics as 
> {code}
> kafka.streams:type=stream-record-cache-metrics,client-id=([-.\w]+),task-id=([-.\w]+),record-cache-id=([-.\w]+)
> {code}
> However, what I've seen from JMXReporter is, for example:
> {code}
> kafka.streams:type=stream-record-cache-metrics,record-cache-id=all,client-id=streams-saak-test-client-StreamThread-1,task-id=1_3
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message