Yuqi Du has posted comments on this change. ( http://gerrit.cloudera.org:8080/18330 )
Change subject: [tool] Fix pbc dump instance for -json/ -json_pretty ...................................................................... Patch Set 6: (5 comments) http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/tools/kudu-tool-test.cc File src/kudu/tools/kudu-tool-test.cc: http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/tools/kudu-tool-test.cc@1598 PS4, Line 1598: > nit: remove these blanks. remove the blanks. the ut will fail. http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/tools/tool_action_pbc.cc File src/kudu/tools/tool_action_pbc.cc: http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/tools/tool_action_pbc.cc@210 PS4, Line 210: RETURN_NOT_OK(pb_reader.Dump(&stream, format, > I think we can add a new flag '--decode_uuid' for this tool, and re-edit th In fact, I don't know all your ideas. The fix is only for instance file(maybe include DirSetPB), its a special, instance file Adding an GFLAG option may be not proper, and I try to change the boolean to an enum. You can review it again. http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/util/easy_json.cc File src/kudu/util/easy_json.cc: http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/util/easy_json.cc@41 PS4, Line 41: EasyJson::EasyJson(ra > nit: maybe remove this comment? Done http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/util/pb_util.cc File src/kudu/util/pb_util.cc: http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/util/pb_util.cc@1033 PS4, Line 1033: ader.ExtractString(json, uuid_field.c_str(), &uuid_b64).ok()) { : EasyJson new_json(const_cast<rapidjson::Value*>(json)); : std::string uuid; : if (Base64Decode(uuid_b64, &uuid)) { : new > nit: maybe convert it to 'new_json.ToString(format)' good http://gerrit.cloudera.org:8080/#/c/18330/4/src/kudu/util/pb_util.cc@1039 PS4, Line 1039: break; : } : } : } : > nit: There are too many indent levels, you can use 'inverted if and short-c Done -- 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: comment Gerrit-Change-Id: Ia21afb03d9b7b4b2d4ea5aaa642701451282bebf Gerrit-Change-Number: 18330 Gerrit-PatchSet: 6 Gerrit-Owner: Yuqi Du <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Wed, 06 Apr 2022 14:01:58 +0000 Gerrit-HasComments: Yes
