You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Scott Kruger (JIRA)" <ji...@apache.org> on 2016/04/06 18:44:25 UTC

[jira] [Created] (KAFKA-3516) Metrics settings in server.properties cause ClassCastException

Scott Kruger created KAFKA-3516:
-----------------------------------

             Summary: Metrics settings in server.properties cause ClassCastException
                 Key: KAFKA-3516
                 URL: https://issues.apache.org/jira/browse/KAFKA-3516
             Project: Kafka
          Issue Type: Bug
          Components: config
    Affects Versions: 0.9.0.1
            Reporter: Scott Kruger


The docs indicate that metrics reporters should be enabled with the `metric.reporters` setting in `server.properties`.  However, setting it to `kafka.metrics.KafkaCSVMetricsReporter` causes the following exception in the server log:

{noformat}
[2016-04-06 16:17:42,010] FATAL  (kafka.Kafka$)
java.lang.ClassCastException: class kafka.metrics.KafkaCSVMetricsReporter
        at java.lang.Class.asSubclass(Class.java:3404)
        at org.apache.kafka.common.utils.Utils.newInstance(Utils.java:328)
        at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstances(AbstractConfig.java:202)
        at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:830)
        at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:698)
        at kafka.server.KafkaConfig$.fromProps(KafkaConfig.scala:695)
        at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:28)
        at kafka.Kafka$.main(Kafka.scala:58)
        at kafka.Kafka.main(Kafka.scala)
{noformat}

Using the `kafka.metrics.reporters` setting instead fixes the issue.

I imagine that either the docs are wrong, or that setting is meant for other metrics reporters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)