You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Joel Koshy (JIRA)" <ji...@apache.org> on 2012/10/08 23:40:02 UTC
[jira] [Reopened] (KAFKA-517) Ensure that we escape the metric
names if they include user strings
[ https://issues.apache.org/jira/browse/KAFKA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joel Koshy reopened KAFKA-517:
------------------------------
I think it is better to fix this properly - i.e., although topics could cause this (before we had the topic constraints) the underlying issue is more general than topics. KafkaMetricsGroup itself should not permit any invalid metric names.
> Ensure that we escape the metric names if they include user strings
> -------------------------------------------------------------------
>
> Key: KAFKA-517
> URL: https://issues.apache.org/jira/browse/KAFKA-517
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.8
> Reporter: Jay Kreps
> Labels: bugs
>
> JMX has limits on valid strings. We need to check validity before blindly creating a metric that includes a given topic name. If we fail to do this we will get an exception like this:
> javax.management.MalformedObjectNameException: Unterminated key property part
> at javax.management.ObjectName.construct(ObjectName.java:540)
> at javax.management.ObjectName.<init>(ObjectName.java:1403)
> at com.yammer.metrics.reporting.JmxReporter.onMetricAdded(JmxReporter.java:395)
> at com.yammer.metrics.core.MetricsRegistry.notifyMetricAdded(MetricsRegistry.java:516)
> at com.yammer.metrics.core.MetricsRegistry.getOrAdd(MetricsRegistry.java:491)
> at com.yammer.metrics.core.MetricsRegistry.newMeter(MetricsRegistry.java:240)
> at com.yammer.metrics.Metrics.newMeter(Metrics.java:245)
> at kafka.metrics.KafkaMetricsGroup$class.newMeter(KafkaMetricsGroup.scala:46)
> at kafka.server.FetcherStat.newMeter(AbstractFetcherThread.scala:180)
> at kafka.server.FetcherStat.<init>(AbstractFetcherThread.scala:182)
> at kafka.server.FetcherStat$$anonfun$2.apply(AbstractFetcherThread.scala:186)
> at kafka.server.FetcherStat$$anonfun$2.apply(AbstractFetcherThread.scala:186)
> at kafka.utils.Pool.getAndMaybePut(Pool.scala:60)
> at kafka.server.FetcherStat$.getFetcherStat(AbstractFetcherThread.scala:190)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira