[ 
https://issues.apache.org/jira/browse/KAFKA-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159272#comment-15159272
 ] 

Babak Behzad commented on KAFKA-3241:
-------------------------------------

sure [~vahid]. We use Kafka's Metrics sink in Hadoop and as soon as our 
Hadoop's resource manager is started, we see these invalid JSONs (you can use 
any simple JSON parsers to see why this is an invalid JSON). I will post our 
patch to fix this issue soon.

> JmxReporter produces invalid JSON when a value is Infinity
> ----------------------------------------------------------
>
>                 Key: KAFKA-3241
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3241
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Babak Behzad
>
> We recently realized that the when JmxReporter$KafkaMbean has some metrics 
> with the value Infinity, the JSON created is invalid since the string value 
> "Infinity" or "-Infinity" are not in double-quotes! Here's an example:
> {noformat}
>  {
>     "name" : 
> "kafka.producer:type=producer-node-metrics,client-id=producer-1,node-id=node-1",
>     "modelerType" : "org.apache.kafka.common.metrics.JmxReporter$KafkaMbean",
>     "request-rate" : 0.0,
>     "request-size-avg" : 0.0,
>     "incoming-byte-rate" : 0.0,
>     "request-size-max" : -Infinity,
>     "outgoing-byte-rate" : 0.0,
>     "request-latency-max" : -Infinity,
>     "request-latency-avg" : 0.0,
>     "response-rate" : 0.0
>   }
> {noformat}



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

Reply via email to