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

Cannot use kafka.metrics.KafkaCSVMetricsReporter

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.0
    • Fix Version/s: None
    • Component/s: core, metrics
    • Labels:
      None
    • Environment:

      Description

      I cannot use kafka.metrics.KafkaCSVMetricsReporter as following with Kafka 1.0.0.

      I added following configuration to server.properties:

      kafka.metrics.reporters=kafka.metrics.KafkaCSVMetricsReporter
      kafka.metrics.polling.interval.secs=5
      kafka.csv.metrics.dir=/tmp/csv_metrics
      kafka.csv.metrics.reporter.enabled=true
      

      And I got following errors in logs/kafkaServer.out every 5 seconds:

      java.io.IOException: Unable to create /tmp/csv_metrics/RequestsPerSec.csv
              at com.yammer.metrics.reporting.CsvReporter.createStreamForMetric(CsvReporter.java:141)
              at com.yammer.metrics.reporting.CsvReporter.getPrintStream(CsvReporter.java:257)
              at com.yammer.metrics.reporting.CsvReporter.access$000(CsvReporter.java:22)
              at com.yammer.metrics.reporting.CsvReporter$1.getStream(CsvReporter.java:156)
              at com.yammer.metrics.reporting.CsvReporter.processMeter(CsvReporter.java:173)
              at com.yammer.metrics.reporting.CsvReporter.processMeter(CsvReporter.java:22)
              at com.yammer.metrics.core.Meter.processWith(Meter.java:131)
              at com.yammer.metrics.reporting.CsvReporter.run(CsvReporter.java:163)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      

      I found https://github.com/infusionsoft/yammer-metrics/blob/v2.2.0/metrics-core/src/main/java/com/yammer/metrics/reporting/CsvReporter.java#L136-L142.
      This means that throw IOException when CSV files to store metrics exist.
      I removed all CSV files and restart server, I got same error...

      I found new version of metrics-core on https://github.com/dropwizard/metrics.
      Kafka should use new version of metrics-core, I think.

      The new version of metrics-core seems not to have a such problem.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              okkez okkez
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: