Description
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)
Attachments
Issue Links
- relates to
-
KAFKA-6008 Kafka Connect: Unsanitized workerID causes exception during startup
- Resolved
-
KAFKA-4243 Ensure metric names are quoted as necessary for JMX
- Open