You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/12/22 16:27:44 UTC

[GitHub] [cassandra] blerer commented on a change in pull request #1362: [CASSANDRA-16378] Expose all client options via system_views.clients and nodetool clientstats

blerer commented on a change in pull request #1362:
URL: https://github.com/apache/cassandra/pull/1362#discussion_r773926028



##########
File path: src/java/org/apache/cassandra/transport/ConnectedClient.java
##########
@@ -128,10 +137,20 @@ private SslHandler sslHandler()
 
     public Map<String, String> asMap()
     {
+        String clientOptionsJSON;
+        ObjectMapper objMapper = new ObjectMapper();
+        try
+        {
+            clientOptionsJSON = objMapper.writeValueAsString(clientOptions().get());
+        } catch(JsonProcessingException e)
+        {
+            clientOptionsJSON = UNDEFINED;
+        }

Review comment:
       We do not normally use json libraries for that type of things. It is also more readable to us Guava Joiner:
   ` Joiner.on(',').withKeyValueSeparator("=").join(clientOptions().get())`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org