You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jay Kreps (JIRA)" <ji...@apache.org> on 2012/09/14 23:36:07 UTC
[jira] [Created] (KAFKA-517) Ensure that we escape the metric names
if they include user strings
Jay Kreps created KAFKA-517:
-------------------------------
Summary: 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
Reporter: Jay Kreps
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
[jira] [Updated] (KAFKA-517) Ensure that we escape the metric names
if they include user strings
Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joel Koshy updated KAFKA-517:
-----------------------------
Affects Version/s: 0.8
> 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
[jira] [Updated] (KAFKA-517) Ensure that we escape the metric names
if they include user strings
Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joel Koshy updated KAFKA-517:
-----------------------------
Labels: bugs (was: )
> 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
[jira] [Resolved] (KAFKA-517) Ensure that we escape the metric
names if they include user strings
Posted by "Yang Ye (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Ye resolved KAFKA-517.
---------------------------
Resolution: Fixed
> 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
[jira] [Commented] (KAFKA-517) Ensure that we escape the metric
names if they include user strings
Posted by "Yang Ye (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471879#comment-13471879 ]
Yang Ye commented on KAFKA-517:
-------------------------------
This is resolved by imposing constrains on the topic 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
[jira] [Reopened] (KAFKA-517) Ensure that we escape the metric
names if they include user strings
Posted by "Joel Koshy (JIRA)" <ji...@apache.org>.
[ 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