The practice of "double JSON encoding" JMX attributes:
- in the MXBean itself using Jetty's JSON.toString(...)
- in the JMXJsonServlet using Jackson
results in malformed JSON documents (technically not "malformed", but doesn't properly allow for traversal into nested JSON structures).
The NodeUsage attribute should instead be:
The Web UI seems to be aware of this and has applied a workaround:
Putting JMX aside, one fix would be to let JMXJsonServlet do all the encoding and simply have the MXBean return a Map. That would, however, likely not encode properly for native JMX access. I'm not familiar enough with how JMX is used elsewhere in Hadoop to suggest an alternative.