Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3516

Metrics settings in server.properties cause ClassCastException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 0.9.0.1
    • Fix Version/s: 0.10.0.0
    • Component/s: config
    • Labels:
      None

      Description

      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:

      [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)
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              omkreddy Manikumar
              Reporter:
              thesquelched Scott Kruger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: