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

metric reporter may hit NullPointerException during shutdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0.0
    • 0.10.2.0
    • core
    • None

    Description

      When we shut down a broker, our metric reporter could throw the following exception.
      java.lang.NullPointerException
      at kafka.network.Processor$$anon$2.value(SocketServer.scala:392)
      at kafka.network.Processor$$anon$2.value(SocketServer.scala:390)

      This is because we report Yammer metric like the following and we de-register the underlying Kafka metric when shutting down the socket server.
      newGauge("IdlePercent",
      new Gauge[Double] {
      def value =

      { metrics.metrics().get(metrics.metricName("io-wait-ratio", "socket-server-metrics", metricTags)).value() }

      },
      metricTags.asScala
      )

      Attachments

        Activity

          People

            xvrl Xavier Léauté
            junrao Jun Rao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: