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

Nick Dimiduk commented on HBASE-25895:
--------------------------------------

[~apurtell]

After some research, my understanding is that Gson handles escaping characters 
according to the JSON RFC's definition of String values. We are free, according 
to the RFC, to encode more aggressively than what Gson does, but it appears to 
implement the minimum plus some additional characters related to html. My test 
demonstrates that there are some binary values that are not encoded and that do 
not render well (at least on this machine).

We may chose to escape a wider range of code points, or we my consider some 
alternative encoding for binary values, such as base64 with perhaps some prefix.

I have made every effort to declare this API as IA.Private, so we are free to 
evolve it as we choose, so long as we can maintain a sufficient level of 
backward compatibility for our guarantees. Thus I would prefer to press forward 
with landing this initial implementation of the feature and continue this 
encoding discussion as a follow-on effort.

Please advise.

https://datatracker.ietf.org/doc/html/rfc4627#section-2.5
https://github.com/google/gson/blob/gson-parent-2.8.9/gson/src/main/java/com/google/gson/stream/JsonWriter.java#L133-L163

> Implement a Cluster Metrics JSON endpoint
> -----------------------------------------
>
>                 Key: HBASE-25895
>                 URL: https://issues.apache.org/jira/browse/HBASE-25895
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Nick Dimiduk
>            Assignee: Nick Dimiduk
>            Priority: Major
>
> In order to build a dynamic visualization functionality, we need access to 
> the underlying dataset. I think we can do a lot by exposing the 
> ClusterMetrics already available via the {{o.a.h.h.client.Admin}} interface.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to