Dan Burkert has posted comments on this change. Change subject: Add 'kudu tserver list' tool ......................................................................
Patch Set 5: (20 comments) http://gerrit.cloudera.org:8080/#/c/6654/4//COMMIT_MSG Commit Message: Line 7: Add 'kudu tserver list' tool > you mean 'kudu tserver list'? Done http://gerrit.cloudera.org:8080/#/c/6654/4/src/kudu/tools/tool_action_common.cc File src/kudu/tools/tool_action_common.cc: Line 372: > Maybe a snippet of sample output? Would be nice for the other variants too. Done PS4, Line 381: | > Nit: no separation. Done Line 405: for (int col = 0; col < num_columns; col++) { > nit: indentation Done PS4, Line 407: if (col != num_columns - 1) cout << "+"; : } : cout << endl; > nit: might make more sense to put the definition of 'padding' inside of the Done Line 416: cout << " " << value; > Why not use JsonWriter? I think that's way less error prone than rolling yo Done Line 474: } else if (boost::iequals(FLAGS_format, "space")) { > Hmm, you sure we want to use timeout_ms as the RPC timeout as well? I think it's easier than having two separate timeout options. Line 484: } > Nit: indentation. Done http://gerrit.cloudera.org:8080/#/c/6654/4/src/kudu/tools/tool_action_common.h File src/kudu/tools/tool_action_common.h: Line 76: // Get the current status of the Kudu server running at 'address', storing it > Unused and undefined? Done Line 118: // Uses the required 'master_addresses' option for the master addresses, and > Should explain what arguments (required/optional) are referenced. Done http://gerrit.cloudera.org:8080/#/c/6654/4/src/kudu/tools/tool_action_tserver.cc File src/kudu/tools/tool_action_tserver.cc: Line 41: using std::string; > Nit: since DECLARE_foo are macros, I think they should precede using statem Done PS4, Line 44: namespace kudu { : : using master::ListTabletServersRequ > Where are these used? Done Line 96: > We typically extract the Status via StatusFromPB(resp.error().status()). That throws away the master error information. Line 102: headers.emplace_back(column.ToString()); > Not cref? Done PS4, Line 104: > I think our convention is not to separate the capture from the arguments. Done PS4, Line 114: onst auto > Could be emplace_back? Done PS4, Line 124: } else if (boost::iequals(column, "version")) { : for (const auto& server : servers) { > Why? I don't think the "underscores are the same as dashes" expectation ext I think it's more ergonomic. I'm not aware of any other instances that are exactly like this. Line 175: .Build(); > Nit: indentation isn't quite right w.r.t. the other actions. Done Line 178: .Description("Operate on a Kudu Tablet Server") > So is the idea that different actions that use --columns may have different This ended up requiring a little additional plumbing in the tool framework, but I think it's a nice additional feature. GFlag default value and descriptions can now be overridden on a per-action basis, which makes them more flexible, and easier to write action-specific descriptions. Line 189 > The new action doesn't match this; it doesn't operate on a single tablet se I originally added it to the cluster mode, but I think it's more discoverable here, and wouldn't require 4 levels of nesting like it would in cluster (kudu cluster tserver list). -- To view, visit http://gerrit.cloudera.org:8080/6654 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I047a7675c186a02dd5d8b405431ae885159fcfee Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes