This is an automated email from the ASF dual-hosted git repository.
bankim 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 83f1f36 [tool] Add the missing "member_type" in help text of list
master CLI
83f1f36 is described below
commit 83f1f367b12893b71f928a1b91e23b0088ee1cd4
Author: Bankim Bhavsar <[email protected]>
AuthorDate: Thu Mar 11 13:27:04 2021 -0800
[tool] Add the missing "member_type" in help text of list master CLI
When "member_type" was introduced in the kudu master list CLI,
missed adding the field to the column description.
Verified "kudu master list --help" lists the optional "member_type"
under the "columns" parameter.
Change-Id: I00f349687866269987691f18aa85e5bf02d5df81
Reviewed-on: http://gerrit.cloudera.org:8080/17175
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Bankim Bhavsar <[email protected]>
---
src/kudu/tools/kudu-tool-test.cc | 5 ++++-
src/kudu/tools/tool_action_master.cc | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/kudu/tools/kudu-tool-test.cc b/src/kudu/tools/kudu-tool-test.cc
index 095e432..748b553 100644
--- a/src/kudu/tools/kudu-tool-test.cc
+++ b/src/kudu/tools/kudu-tool-test.cc
@@ -3336,11 +3336,14 @@ TEST_F(ToolTest, TestMasterList) {
string out;
NO_FATALS(RunActionStdoutString(
- Substitute("master list $0 --columns=uuid,rpc-addresses", master_addr),
+ Substitute("master list $0
--columns=uuid,rpc-addresses,role,member_type", master_addr),
&out));
ASSERT_STR_CONTAINS(out, master->uuid());
ASSERT_STR_CONTAINS(out, master->bound_rpc_hostport().ToString());
+ ASSERT_STR_MATCHES(out, "LEADER|FOLLOWER|LEARNER|NON_PARTICIPANT");
+ // Following check will match both VOTER AND NON_VOTER.
+ ASSERT_STR_CONTAINS(out, "VOTER");
}
// Operate on Kudu tables:
diff --git a/src/kudu/tools/tool_action_master.cc
b/src/kudu/tools/tool_action_master.cc
index e3da814..7826fa5 100644
--- a/src/kudu/tools/tool_action_master.cc
+++ b/src/kudu/tools/tool_action_master.cc
@@ -553,7 +553,7 @@ unique_ptr<Mode> BuildMasterMode() {
string("Comma-separated list of master info fields to "
"include in output.\nPossible values: uuid, cluster_id"
"rpc-addresses, http-addresses, version, seqno, "
- "start_time and role"))
+ "start_time, role and member_type"))
.AddOptionalParameter("format")
.Build();
builder.AddAction(std::move(list_masters));