Shawyeok commented on PR #2180:
URL: https://github.com/apache/zookeeper/pull/2180#issuecomment-2295227001

   Thanks for reviewing. I replied inline here:
   
   > had to deal with encoding quirks of different terminals,
   
   Could you explain more about this? IMO, `base64` or `hexdump` are just 
different view of the byte array, it should not involve any encoding problem (a 
terminal not support ascii?).
   
   > user requests for even more different kinds of serialization, custom 
formats, etc.
   
   IMO, domain-related serialization or formatting is beyound the general 
support area of the Zookeeper CLI.
   
   > I can understand how adding this seems like it would be a useful addition. 
However, in my experience, all it is likely to do is allow users with specific 
binary requirements to start depending on the zkcli tool for more than simple 
triage and troubleshooting, and will run into a lot of edge cases when they 
start to rely on it more. That will increase the maintenance burden and code 
complexity, without a lot of actual benefit to users.
   
   In my senario, I need to see the actual znode data when troubleshooting with 
application build around Apache Zookeeper e.g. Apache Pulsar, I do it by now is 
write an one-time only program to get znode data and print it in base64. If 
zookeeper cli supports it, it should provides convience with troubleshooting 
with binary znode data.
   
   > As an alternative, I suggest users who want to use binary data be directed 
to solutions like jshell, a built in Java utility that allows them to write 
simple custom Java scripts on the fly to interact with ZooKeeper. This keeps 
the maintenance burden for ZooKeeper low, and puts the responsibility for any 
custom binary formats directly on the users who have those requirements without 
introducing any complexity for users who do not.
   
   `jshell` is an interesting solution for a Java command-line program. I'll 
try it in the next use case. Thanks for bringing it to my attention. However, 
`jshell` requires Java 9, while ZooKeeper currently supports Java 8 and later.


-- 
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: notifications-unsubscr...@zookeeper.apache.org

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

Reply via email to