[ https://issues.apache.org/jira/browse/KAFKA-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14177149#comment-14177149 ]
Vladimir Tretyakov commented on KAFKA-1481: ------------------------------------------- Hi, fuf:), created new patch (for 0.8.2 branch). re 2.1, 2.3 - didn't change this part because we use this part in our monitoring, it is more handy for user to see something like 'localhost:9092' instead of '2 (where 2 is broker id)'. For us it is easiest to see/have this information directly in mBean. With this patch mBeanNames look like: {code} kafka.producer:type=ProducerTopicMetrics,name=MessagesPerSec,topic=spm_alerts_topic kafka.producer:type=ProducerTopicMetrics,name=MessagesPerSec,allTopics=true kafka.log:type=Log,name=LogEndOffset,topic=spm_alerts_topic,partitionId=0 kafka.consumer:type=ZookeeperConsumerConnector,name=FetchQueueSize,timestamp=1413817796508,clientId=af_servers,uuid=9f99df40,groupId=af_servers,topicThreadId=spm_topic,consumerHostName=wawanawna,threadId=0 kafka.consumer:type=FetchRequestAndResponseMetrics,name=FetchRequestRateAndTimeMs,clientId=af_servers,threadName=ConsumerFetcherThread,fetcherId=0,sourceBrokerId=0,groupId=af_servers,consumerHostName=wawanawna,timestamp=1413817796508,uuid=9f99df40,brokerHost=wawanawna,brokerPort=9092 {code} There is not everything clear for me in code, so I've tried to avoid deep refactoring. All tests passed for me locally. PS: note that if 'value' part is empty (in key->value structure) we will not see this part in attributes. example: "key1"->"value1","key2"->null,"key3"->"value3" will be converted to "key1=value1,key3=value3". > Stop using dashes AND underscores as separators in MBean names > -------------------------------------------------------------- > > Key: KAFKA-1481 > URL: https://issues.apache.org/jira/browse/KAFKA-1481 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 0.8.1.1 > Reporter: Otis Gospodnetic > Priority: Critical > Labels: patch > Fix For: 0.8.2 > > Attachments: KAFKA-1481_2014-06-06_13-06-35.patch, > KAFKA-1481_2014-10-13_18-23-35.patch, KAFKA-1481_2014-10-14_21-53-35.patch, > KAFKA-1481_2014-10-15_10-23-35.patch, > KAFKA-1481_IDEA_IDE_2014-10-14_21-53-35.patch, > KAFKA-1481_IDEA_IDE_2014-10-15_10-23-35.patch > > > MBeans should not use dashes or underscores as separators because these > characters are allowed in hostnames, topics, group and consumer IDs, etc., > and these are embedded in MBeans names making it impossible to parse out > individual bits from MBeans. > Perhaps a pipe character should be used to avoid the conflict. > This looks like a major blocker because it means nobody can write Kafka 0.8.x > monitoring tools unless they are doing it for themselves AND do not use > dashes AND do not use underscores. > See: http://search-hadoop.com/m/4TaT4lonIW -- This message was sent by Atlassian JIRA (v6.3.4#6332)