Will Berkeley has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/9948


Change subject:  Add GetFlags endpoint and tool
......................................................................

Add GetFlags endpoint and tool

This adds an rpc endpoint that retrieves gflags from servers.

It also includes a tool for retrieving flag values from servers.
By default, it returns only flags that were explicitly set
(according to gflags). It supports returning all flags, and also
filtering flags by tags.

Example output from the tool run against a local cluster's master:

          flag          |                     value                     | set? 
| default value? |      tags
------------------------+-----------------------------------------------+------+----------------+-----------------
 log_dir                | /tmp/kudu/logs/master/0                       | true 
| false          | stable
 heap_profile_path      | /tmp/kudu-master.56285                        | true 
| false          | advanced,stable
 log_filename           | kudu-master                                   | true 
| false          | stable
 webserver_doc_root     | /Users/wdberkeley/src/kudu/www                | true 
| true           | advanced
 webserver_interface    | 127.0.0.1                                     | true 
| false          | advanced
 master_addresses       | 127.0.0.1:7053,127.0.0.1:7052,127.0.0.1:7051, | true 
| false          | stable
 fs_data_dirs           | /tmp/kudu/data/master/0/0                     | true 
| false          | stable
 rpc_bind_addresses     | 127.0.0.1:7051                                | true 
| false          | stable
 fs_wal_dir             | /tmp/kudu/wal/master/0                        | true 
| false          | stable
 evict_failed_followers | false                                         | true 
| false          | advanced
 webserver_port         | 8051                                          | true 
| false          | stable

Unfortunately, some flags are set within Kudu and it's not possible for
gflags to determine that they weren't set with an explicit flag, e.g.
-log_filename and -evict_failed_followers in the above output. Still,
the output is valuable for quickly seeing a server's configuration.

The rpc endpoint will also be used by ksck in a follow-up.

Change-Id: Ia35b4261099c1a3c6e2ff68e907c84df9a7ff699
---
M src/kudu/server/generic_service.cc
M src/kudu/server/generic_service.h
M src/kudu/server/server_base.proto
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_common.cc
M src/kudu/tools/tool_action_common.h
M src/kudu/tools/tool_action_master.cc
M src/kudu/tools/tool_action_tserver.cc
M src/kudu/util/flags.cc
M src/kudu/util/flags.h
10 files changed, 200 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/9948/1
--
To view, visit http://gerrit.cloudera.org:8080/9948
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia35b4261099c1a3c6e2ff68e907c84df9a7ff699
Gerrit-Change-Number: 9948
Gerrit-PatchSet: 1
Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>

Reply via email to