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 =
},
metricTags.asScala
)