Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18446 )
Change subject: [tools] Add '--create_table_replication_factor' flag for 'kudu table copy' ...................................................................... Patch Set 3: (2 comments) http://gerrit.cloudera.org:8080/#/c/18446/3/src/kudu/tools/kudu-tool-test.cc File src/kudu/tools/kudu-tool-test.cc: http://gerrit.cloudera.org:8080/#/c/18446/3/src/kudu/tools/kudu-tool-test.cc@608 PS3, Line 608: explict set it to 3 nit: explicitly set to 3 http://gerrit.cloudera.org:8080/#/c/18446/3/src/kudu/tools/tool_action_table.cc File src/kudu/tools/tool_action_table.cc: http://gerrit.cloudera.org:8080/#/c/18446/3/src/kudu/tools/tool_action_table.cc@656 PS3, Line 656: if (!FLAGS_create_table && FLAGS_create_table_replication_factor != -1) { : return Status::InvalidArgument( : Substitute("--create_table_replication_factor is meaningless when --create_table=false")); : } Thanks for adding this verification. In Kudu, we have a special provision to handle this sort of validation when multiple flags involved. Please take a look at so-called group gflags validators. Search for GROUP_FLAG_VALIDATOR macros in the code (e.g., https://github.com/apache/kudu/blob/d216e417f7fa7daef59ec7eb2c15aadfd4e1c563/src/kudu/tools/tool_action_perf.cc#L405). Using group flag validators instead of this code might be a bit cleaner approach. -- To view, visit http://gerrit.cloudera.org:8080/18446 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I9a4eebdcf85b5ec3666e023194b8c06d66b0a683 Gerrit-Change-Number: 18446 Gerrit-PatchSet: 3 Gerrit-Owner: Yingchun Lai <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Comment-Date: Wed, 27 Apr 2022 02:37:44 +0000 Gerrit-HasComments: Yes
