[
https://issues.apache.org/jira/browse/HBASE-20571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472970#comment-16472970
]
stack commented on HBASE-20571:
-------------------------------
+1 from me. Thanks for fixing this. I noticed it but hacked my json parse to
deal with occasional NaN rather than do the real fix as you have. I'll not
commit yet. [[email protected]] has a comment up on RB. Perhaps you want to
address.
> JMXJsonServlet generates invalid JSON if it has NaN in metrics
> --------------------------------------------------------------
>
> Key: HBASE-20571
> URL: https://issues.apache.org/jira/browse/HBASE-20571
> Project: HBase
> Issue Type: Bug
> Components: UI
> Reporter: Balazs Meszaros
> Assignee: Balazs Meszaros
> Priority: Major
> Fix For: 2.0.1
>
> Attachments: HBASE-20571.branch-2.0.001.patch
>
>
> {{/jmx}} servlet responses invalid JSON, if some metrics are NaN:
> {code}
> "l1CacheHitCount" : 0,
> "l1CacheMissCount" : 0,
> "l1CacheHitRatio" : NaN,
> "l1CacheMissRatio" : NaN,
> "l2CacheHitCount" : 0,
> "l2CacheMissCount" : 0,
> "l2CacheHitRatio" : 0.0,
> "l2CacheMissRatio" : 0.0,
> {code}
> NaN is an invalid character sequence in JSON. We should not response NaN in
> metrics.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)