This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new d06f35db2 KUDU-3326 correct error messages in tool usage instructions
d06f35db2 is described below
commit d06f35db2e5a0e93a3dcab0d3b26e4443914df89
Author: kedeng <[email protected]>
AuthorDate: Tue Apr 9 14:44:26 2024 +0800
KUDU-3326 correct error messages in tool usage instructions
This patch mainly fixes the error messages in the recall tool as follows:
`
Usage: kudu table recall <master_addresses> <tablet_id>
[-new_table_name=<name>]
`
We expect to recall tables in soft delete state using the table ID,
not the tablet ID. The correct output is as follows:
`
Usage: kudu table recall <master_addresses> <table_id>
[-new_table_name=<name>]
`
This is just about correcting the errors in the prompts and does not
involve any related recall logic. Therefore, there are no additional
unit tests added.
Change-Id: Ib1c6df0806eee78280b00f6a528d42d434a63e2f
Reviewed-on: http://gerrit.cloudera.org:8080/21266
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/tools/tool_action_common.cc | 1 +
src/kudu/tools/tool_action_common.h | 1 +
src/kudu/tools/tool_action_table.cc | 4 ++--
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/kudu/tools/tool_action_common.cc
b/src/kudu/tools/tool_action_common.cc
index 31d39f3c4..f4cd2e354 100644
--- a/src/kudu/tools/tool_action_common.cc
+++ b/src/kudu/tools/tool_action_common.cc
@@ -294,6 +294,7 @@ const char* const kDestMasterAddressesArgDesc = "Either
comma-separated list of
"master addresses where each address is of form 'hostname:port', or a
cluster name if it has "
"been configured in ${KUDU_CONFIG}/kudurc";
const char* const kTableNameArg = "table_name";
+const char* const kTableIdArg = "table_id";
const char* const kTabletIdArg = "tablet_id";
const char* const kTabletIdArgDesc = "Tablet Identifier";
const char* const kTabletIdsCsvArg = "tablet_ids";
diff --git a/src/kudu/tools/tool_action_common.h
b/src/kudu/tools/tool_action_common.h
index 061b4c677..ad3be7828 100644
--- a/src/kudu/tools/tool_action_common.h
+++ b/src/kudu/tools/tool_action_common.h
@@ -69,6 +69,7 @@ extern const char* const kMasterAddressesArgDesc;
extern const char* const kDestMasterAddressesArg;
extern const char* const kDestMasterAddressesArgDesc;
extern const char* const kTableNameArg;
+extern const char* const kTableIdArg;
extern const char* const kTabletIdArg;
extern const char* const kTabletIdArgDesc;
extern const char* const kTabletIdsCsvArg;
diff --git a/src/kudu/tools/tool_action_table.cc
b/src/kudu/tools/tool_action_table.cc
index 218209f6a..9d8ae7885 100644
--- a/src/kudu/tools/tool_action_table.cc
+++ b/src/kudu/tools/tool_action_table.cc
@@ -832,7 +832,7 @@ Status SetRowCountLimit(const RunnerContext& context) {
}
Status RecallTable(const RunnerContext& context) {
- const string& table_id = FindOrDie(context.required_args, kTabletIdArg);
+ const string& table_id = FindOrDie(context.required_args, kTableIdArg);
client::sp::shared_ptr<KuduClient> client;
RETURN_NOT_OK(CreateKuduClient(context, &client));
return client->RecallTable(table_id, FLAGS_new_table_name);
@@ -1914,7 +1914,7 @@ unique_ptr<Mode> BuildTableMode() {
ActionBuilder("recall", &RecallTable)
.Description("Recall a deleted but still reserved table")
.AddRequiredParameter({ kMasterAddressesArg, kMasterAddressesArgDesc })
- .AddRequiredParameter({ kTabletIdArg, "ID of the table to recall" })
+ .AddRequiredParameter({ kTableIdArg, "ID of the table to recall" })
.AddOptionalParameter("new_table_name")
.Build();