Hello Alexey Serbin, Ashwani Raina, Yingchun Lai, Yifan Zhang, Kudu Jenkins, 
Abhishek Chennaka, KeDeng, Wang Xixu,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/18330

to look at the new patch set (#17).

Change subject: [tool] Fix outputs 'kudu pbc dump instance' when using 
-json/-json_pretty
......................................................................

[tool] Fix outputs 'kudu pbc dump instance' when using -json/-json_pretty

The output of two commands below about the 'uuid' field are not the same
1. kudu pbc dump xxx/instance -debug/default
2. kudu pbc dump xxx/instance -json/-json_pretty

For example:
1. kudu pbc dump instance, which is a plain output format.
Message 0
-------
uuid: "ac6b3e392cb34b4681e54a33c95fdf9c"
format_stamp: "Formatted at 2023-03-10 09:16:22 on 2a43db713d56"

2. kudu pbc dump instance --json, which is a json output format
{"uuid":"YWM2YjNlMzkyY2IzNGI0NjgxZTU0YTMzYzk1ZmRmOWM=","formatStamp":"Formatted 
at 2023-03-10 09:16:22 on 2a43db713d56"}

The reason is the type of 'uuid' is bytes and protobuf's bytes type is 
base64-encoded.
'--debug/default' mode shows uuid's plain text while '--debug/default'
mode uses protobuf's API and shows base64-encoded text.

This patch fixes this problem.

Change-Id: Ia21afb03d9b7b4b2d4ea5aaa642701451282bebf
---
M src/kudu/fs/fs.proto
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_pbc.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/pb_util.cc
M src/kudu/util/pb_util.h
M src/kudu/util/pb_util.proto
8 files changed, 103 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/30/18330/17
--
To view, visit http://gerrit.cloudera.org:8080/18330
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia21afb03d9b7b4b2d4ea5aaa642701451282bebf
Gerrit-Change-Number: 18330
Gerrit-PatchSet: 17
Gerrit-Owner: Yuqi Du <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>

Reply via email to