IMPALA-5174: Suppress kudu flags that aren't relevant to Impala

Importing Kudu's util/, security/ and rpc/ code into the
Impala code base results in Kudu's gflags showing up in the log
files and the /varz webpages, for all the gflags that belong to
Kudu files that are in some way used by Impala.

For eg: If in Impala, we include kudu/rpc/messenger.h and use one
of its classes whose method definitions live in the corresponding
messenger.cc file, all the flags DEFINEd in the messenger.cc file
will show up in the Impala logs. If we do not use any code in a .cc
file, the flags that are DEFINEd in that file do not show up (this
is probably due to the compiler not running macros in files that
have only dead code).

Since we don't want these flags to be user configurable, we don't
want them to be visible. The following commit earlier included a
gflags patch that added a DEFINE_*_hidden() macro that allows us to
do just this:
https://github.com/apache/incubator-impala/commit/d1910a39fcc50ce211b95c3552c0c90b4bc37bbd

This patch was done by running the following sed command:

find $IMPALA_HOME/be/src/kudu -type f | xargs sed -i 
's/^\(DEFINE_.*\)\((.*\)/\1_hidden\2/g'

There were a couple non-related macros that also got changed:
DEFINE_validator() and DEFINE_STATIC_THREAD_LOCAL(), which were
manually changed back.

Change-Id: I499c903cde92595c4a02803ecbf98ac1d41517b4
Reviewed-on: http://gerrit.cloudera.org:8080/8074
Reviewed-by: Sailesh Mukil <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/ab0bc9ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/ab0bc9ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/ab0bc9ee

Branch: refs/heads/master
Commit: ab0bc9eedf1b871a32c25507164101f1d30694db
Parents: 0601f06
Author: Sailesh Mukil <[email protected]>
Authored: Thu Sep 14 12:58:42 2017 -0700
Committer: Impala Public Jenkins <[email protected]>
Committed: Wed Oct 4 08:26:04 2017 +0000

----------------------------------------------------------------------
 be/src/kudu/rpc/acceptor_pool.cc           |  2 +-
 be/src/kudu/rpc/messenger.cc               | 14 +++++++-------
 be/src/kudu/rpc/negotiation-test.cc        |  2 +-
 be/src/kudu/rpc/negotiation.cc             |  6 +++---
 be/src/kudu/rpc/outbound_call.cc           |  4 ++--
 be/src/kudu/rpc/reactor.cc                 |  4 ++--
 be/src/kudu/rpc/result_tracker.cc          |  6 +++---
 be/src/kudu/rpc/rpc-bench.cc               | 12 ++++++------
 be/src/kudu/rpc/rpc_stub-test.cc           |  2 +-
 be/src/kudu/rpc/rpcz_store.cc              |  2 +-
 be/src/kudu/rpc/server_negotiation.cc      |  4 ++--
 be/src/kudu/rpc/service_if.cc              |  2 +-
 be/src/kudu/rpc/service_queue-test.cc      |  6 +++---
 be/src/kudu/rpc/transfer.cc                |  2 +-
 be/src/kudu/security/tls_context.cc        |  6 +++---
 be/src/kudu/security/token_signer.cc       |  2 +-
 be/src/kudu/util/cache.cc                  |  2 +-
 be/src/kudu/util/debug/trace_event_impl.cc |  2 +-
 be/src/kudu/util/env_posix.cc              | 12 ++++++------
 be/src/kudu/util/env_util.cc               | 10 +++++-----
 be/src/kudu/util/file_cache-stress-test.cc |  8 ++++----
 be/src/kudu/util/file_cache.cc             |  2 +-
 be/src/kudu/util/flag_tags-test.cc         | 12 ++++++------
 be/src/kudu/util/flag_validators-test.cc   |  8 ++++----
 be/src/kudu/util/flags-test.cc             | 10 +++++-----
 be/src/kudu/util/flags.cc                  | 14 +++++++-------
 be/src/kudu/util/kernel_stack_watchdog.cc  |  2 +-
 be/src/kudu/util/logging.cc                |  4 ++--
 be/src/kudu/util/maintenance_manager.cc    | 14 +++++++-------
 be/src/kudu/util/memory/arena-test.cc      |  6 +++---
 be/src/kudu/util/memory/memory.cc          |  2 +-
 be/src/kudu/util/metrics.cc                |  2 +-
 be/src/kudu/util/minidump.cc               |  2 +-
 be/src/kudu/util/mt-hdr_histogram-test.cc  |  4 ++--
 be/src/kudu/util/mt-metrics-test.cc        |  2 +-
 be/src/kudu/util/mutex.cc                  |  2 +-
 be/src/kudu/util/net/dns_resolver.cc       |  2 +-
 be/src/kudu/util/net/net_util.cc           |  2 +-
 be/src/kudu/util/net/socket.cc             |  4 ++--
 be/src/kudu/util/nvm_cache.cc              |  6 +++---
 be/src/kudu/util/process_memory.cc         | 10 +++++-----
 be/src/kudu/util/spinlock_profiling.cc     |  2 +-
 be/src/kudu/util/striped64-test.cc         |  4 ++--
 be/src/kudu/util/test_main.cc              |  4 ++--
 be/src/kudu/util/test_util.cc              |  4 ++--
 45 files changed, 117 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/acceptor_pool.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/acceptor_pool.cc b/be/src/kudu/rpc/acceptor_pool.cc
index f3c935c..cbb1232 100644
--- a/be/src/kudu/rpc/acceptor_pool.cc
+++ b/be/src/kudu/rpc/acceptor_pool.cc
@@ -47,7 +47,7 @@ METRIC_DEFINE_counter(server, rpc_connections_accepted,
                       kudu::MetricUnit::kConnections,
                       "Number of incoming TCP connections made to the RPC 
server");
 
-DEFINE_int32(rpc_acceptor_listen_backlog, 128,
+DEFINE_int32_hidden(rpc_acceptor_listen_backlog, 128,
              "Socket backlog parameter used when listening for RPC 
connections. "
              "This defines the maximum length to which the queue of pending "
              "TCP connections inbound to the RPC server may grow. If a 
connection "

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/messenger.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/messenger.cc b/be/src/kudu/rpc/messenger.cc
index 74fb0f4..ad2ba67 100644
--- a/be/src/kudu/rpc/messenger.cc
+++ b/be/src/kudu/rpc/messenger.cc
@@ -63,14 +63,14 @@ using std::shared_ptr;
 using std::make_shared;
 using strings::Substitute;
 
-DEFINE_string(rpc_authentication, "optional",
+DEFINE_string_hidden(rpc_authentication, "optional",
               "Whether to require RPC connections to authenticate. Must be one 
"
               "of 'disabled', 'optional', or 'required'. If 'optional', "
               "authentication will be used when the remote end supports it. If 
"
               "'required', connections which are not able to authenticate "
               "(because the remote end lacks support) are rejected. Secure "
               "clusters should use 'required'.");
-DEFINE_string(rpc_encryption, "optional",
+DEFINE_string_hidden(rpc_encryption, "optional",
               "Whether to require RPC connections to be encrypted. Must be one 
"
               "of 'disabled', 'optional', or 'required'. If 'optional', "
               "encryption will be used when the remote end supports it. If "
@@ -82,18 +82,18 @@ DEFINE_string(rpc_encryption, "optional",
 TAG_FLAG(rpc_authentication, evolving);
 TAG_FLAG(rpc_encryption, evolving);
 
-DEFINE_string(rpc_certificate_file, "",
+DEFINE_string_hidden(rpc_certificate_file, "",
               "Path to a PEM encoded X509 certificate to use for securing RPC "
               "connections with SSL/TLS. If set, '--rpc_private_key_file' and "
               "'--rpc_ca_certificate_file' must be set as well.");
-DEFINE_string(rpc_private_key_file, "",
+DEFINE_string_hidden(rpc_private_key_file, "",
               "Path to a PEM encoded private key paired with the certificate "
               "from '--rpc_certificate_file'");
-DEFINE_string(rpc_ca_certificate_file, "",
+DEFINE_string_hidden(rpc_ca_certificate_file, "",
               "Path to the PEM encoded X509 certificate of the trusted 
external "
               "certificate authority. The provided certificate should be the 
root "
               "issuer of the certificate passed in '--rpc_certificate_file'.");
-DEFINE_string(rpc_private_key_password_cmd, "", "A Unix command whose output "
+DEFINE_string_hidden(rpc_private_key_password_cmd, "", "A Unix command whose 
output "
               "returns the password used to decrypt the RPC server's private 
key "
               "file specified in --rpc_private_key_file. If the .PEM key file 
is "
               "not password-protected, this flag does not need to be set. "
@@ -107,7 +107,7 @@ TAG_FLAG(rpc_certificate_file, experimental);
 TAG_FLAG(rpc_private_key_file, experimental);
 TAG_FLAG(rpc_ca_certificate_file, experimental);
 
-DEFINE_int32(rpc_default_keepalive_time_ms, 65000,
+DEFINE_int32_hidden(rpc_default_keepalive_time_ms, 65000,
              "If an RPC connection from a client is idle for this amount of 
time, the server "
              "will disconnect the client.");
 TAG_FLAG(rpc_default_keepalive_time_ms, advanced);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/negotiation-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/negotiation-test.cc 
b/be/src/kudu/rpc/negotiation-test.cc
index 68185bb..43b6e60 100644
--- a/be/src/kudu/rpc/negotiation-test.cc
+++ b/be/src/kudu/rpc/negotiation-test.cc
@@ -66,7 +66,7 @@
 #define KRB5_VERSION_LE_1_10
 #endif
 
-DEFINE_bool(is_test_child, false,
+DEFINE_bool_hidden(is_test_child, false,
             "Used by tests which require clean processes. "
             "See TestDisableInit.");
 DECLARE_bool(rpc_encrypt_loopback_connections);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/negotiation.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/negotiation.cc b/be/src/kudu/rpc/negotiation.cc
index 0c5ca3f..f2ee4d7 100644
--- a/be/src/kudu/rpc/negotiation.cc
+++ b/be/src/kudu/rpc/negotiation.cc
@@ -44,13 +44,13 @@
 #include "kudu/util/status.h"
 #include "kudu/util/trace.h"
 
-DEFINE_bool(rpc_trace_negotiation, false,
+DEFINE_bool_hidden(rpc_trace_negotiation, false,
             "If enabled, dump traces of all RPC negotiations to the log");
 TAG_FLAG(rpc_trace_negotiation, runtime);
 TAG_FLAG(rpc_trace_negotiation, advanced);
 TAG_FLAG(rpc_trace_negotiation, experimental);
 
-DEFINE_int32(rpc_negotiation_inject_delay_ms, 0,
+DEFINE_int32_hidden(rpc_negotiation_inject_delay_ms, 0,
              "If enabled, injects the given number of milliseconds delay into "
              "the RPC negotiation process on the server side.");
 TAG_FLAG(rpc_negotiation_inject_delay_ms, unsafe);
@@ -58,7 +58,7 @@ TAG_FLAG(rpc_negotiation_inject_delay_ms, unsafe);
 DECLARE_string(keytab_file);
 DECLARE_string(rpc_certificate_file);
 
-DEFINE_bool(rpc_encrypt_loopback_connections, false,
+DEFINE_bool_hidden(rpc_encrypt_loopback_connections, false,
             "Whether to encrypt data transfer on RPC connections that stay 
within "
             "a single host. Encryption here is likely to offer no additional "
             "security benefit since only a local 'root' user could intercept 
the "

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/outbound_call.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/outbound_call.cc b/be/src/kudu/rpc/outbound_call.cc
index 8e248d2..bfaf760 100644
--- a/be/src/kudu/rpc/outbound_call.cc
+++ b/be/src/kudu/rpc/outbound_call.cc
@@ -39,7 +39,7 @@
 // 100M cycles should be about 50ms on a 2Ghz box. This should be high
 // enough that involuntary context switches don't trigger it, but low enough
 // that any serious blocking behavior on the reactor would.
-DEFINE_int64(rpc_callback_max_cycles, 100 * 1000 * 1000,
+DEFINE_int64_hidden(rpc_callback_max_cycles, 100 * 1000 * 1000,
              "The maximum number of cycles for which an RPC callback "
              "should be allowed to run without emitting a warning."
              " (Advanced debugging option)");
@@ -47,7 +47,7 @@ TAG_FLAG(rpc_callback_max_cycles, advanced);
 TAG_FLAG(rpc_callback_max_cycles, runtime);
 
 // Flag used in debug build for injecting cancellation at different code paths.
-DEFINE_int32(rpc_inject_cancellation_state, -1,
+DEFINE_int32_hidden(rpc_inject_cancellation_state, -1,
              "If this flag is not -1, it is the state in which a cancellation 
request "
              "will be injected. Should use values in OutboundCall::State 
only");
 TAG_FLAG(rpc_inject_cancellation_state, unsafe);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/reactor.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/reactor.cc b/be/src/kudu/rpc/reactor.cc
index b935e68..313a08b 100644
--- a/be/src/kudu/rpc/reactor.cc
+++ b/be/src/kudu/rpc/reactor.cc
@@ -70,12 +70,12 @@ using std::shared_ptr;
 using std::unique_ptr;
 using strings::Substitute;
 
-DEFINE_int64(rpc_negotiation_timeout_ms, 3000,
+DEFINE_int64_hidden(rpc_negotiation_timeout_ms, 3000,
              "Timeout for negotiating an RPC connection.");
 TAG_FLAG(rpc_negotiation_timeout_ms, advanced);
 TAG_FLAG(rpc_negotiation_timeout_ms, runtime);
 
-DEFINE_bool(rpc_reopen_outbound_connections, false,
+DEFINE_bool_hidden(rpc_reopen_outbound_connections, false,
             "Open a new connection to the server for every RPC call. "
             "If not enabled, an already existing connection to a "
             "server is reused upon making another call to the same server. "

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/result_tracker.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/result_tracker.cc 
b/be/src/kudu/rpc/result_tracker.cc
index 11ff8d2..8260e0e 100644
--- a/be/src/kudu/rpc/result_tracker.cc
+++ b/be/src/kudu/rpc/result_tracker.cc
@@ -30,7 +30,7 @@
 #include "kudu/util/pb_util.h"
 #include "kudu/util/trace.h"
 
-DEFINE_int64(remember_clients_ttl_ms, 3600 * 1000 /* 1 hour */,
+DEFINE_int64_hidden(remember_clients_ttl_ms, 3600 * 1000 /* 1 hour */,
     "Maximum amount of time, in milliseconds, the server \"remembers\" a 
client for the "
     "purpose of caching its responses. After this period without hearing from 
it, the "
     "client is no longer remembered and the memory occupied by its responses 
is reclaimed. "
@@ -38,14 +38,14 @@ DEFINE_int64(remember_clients_ttl_ms, 3600 * 1000 /* 1 hour 
*/,
     "ones.");
 TAG_FLAG(remember_clients_ttl_ms, advanced);
 
-DEFINE_int64(remember_responses_ttl_ms, 600 * 1000 /* 10 mins */,
+DEFINE_int64_hidden(remember_responses_ttl_ms, 600 * 1000 /* 10 mins */,
     "Maximum amount of time, in milliseconds, the server \"remembers\" a 
response to a "
     "specific request for a client. After this period has elapsed, the 
response may have "
     "been garbage collected and the client might get a response indicating the 
request is "
     "STALE.");
 TAG_FLAG(remember_responses_ttl_ms, advanced);
 
-DEFINE_int64(result_tracker_gc_interval_ms, 1000,
+DEFINE_int64_hidden(result_tracker_gc_interval_ms, 1000,
     "Interval at which the result tracker will look for entries to GC.");
 TAG_FLAG(result_tracker_gc_interval_ms, hidden);
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/rpc-bench.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/rpc-bench.cc b/be/src/kudu/rpc/rpc-bench.cc
index 47be939..027f01c 100644
--- a/be/src/kudu/rpc/rpc-bench.cc
+++ b/be/src/kudu/rpc/rpc-bench.cc
@@ -35,26 +35,26 @@ using std::thread;
 using std::unique_ptr;
 using std::vector;
 
-DEFINE_int32(client_threads, 16,
+DEFINE_int32_hidden(client_threads, 16,
              "Number of client threads. For the synchronous benchmark, each 
thread has "
              "a single outstanding synchronous request at a time. For the 
async "
              "benchmark, this determines the number of client reactors.");
 
-DEFINE_int32(async_call_concurrency, 60,
+DEFINE_int32_hidden(async_call_concurrency, 60,
              "Number of concurrent requests that will be outstanding at a time 
for the "
              "async benchmark. The requests are multiplexed across the number 
of "
              "reactors specified by the 'client_threads' flag.");
 
-DEFINE_int32(worker_threads, 1,
+DEFINE_int32_hidden(worker_threads, 1,
              "Number of server worker threads");
 
-DEFINE_int32(server_reactors, 4,
+DEFINE_int32_hidden(server_reactors, 4,
              "Number of server reactor threads");
 
-DEFINE_int32(run_seconds, 1, "Seconds to run the test");
+DEFINE_int32_hidden(run_seconds, 1, "Seconds to run the test");
 
 DECLARE_bool(rpc_encrypt_loopback_connections);
-DEFINE_bool(enable_encryption, false, "Whether to enable TLS encryption for 
rpc-bench");
+DEFINE_bool_hidden(enable_encryption, false, "Whether to enable TLS encryption 
for rpc-bench");
 
 namespace kudu {
 namespace rpc {

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/rpc_stub-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/rpc_stub-test.cc b/be/src/kudu/rpc/rpc_stub-test.cc
index ccb4fd1..4095412 100644
--- a/be/src/kudu/rpc/rpc_stub-test.cc
+++ b/be/src/kudu/rpc/rpc_stub-test.cc
@@ -38,7 +38,7 @@
 #include "kudu/util/test_util.h"
 #include "kudu/util/user.h"
 
-DEFINE_bool(is_panic_test_child, false, "Used by TestRpcPanic");
+DEFINE_bool_hidden(is_panic_test_child, false, "Used by TestRpcPanic");
 DECLARE_bool(socket_inject_short_recvs);
 
 using std::shared_ptr;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/rpcz_store.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/rpcz_store.cc b/be/src/kudu/rpc/rpcz_store.cc
index 66c23d0..61cc87d 100644
--- a/be/src/kudu/rpc/rpcz_store.cc
+++ b/be/src/kudu/rpc/rpcz_store.cc
@@ -35,7 +35,7 @@
 #include "kudu/util/trace.h"
 
 
-DEFINE_bool(rpc_dump_all_traces, false,
+DEFINE_bool_hidden(rpc_dump_all_traces, false,
             "If true, dump all RPC traces at INFO level");
 TAG_FLAG(rpc_dump_all_traces, advanced);
 TAG_FLAG(rpc_dump_all_traces, runtime);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/server_negotiation.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/server_negotiation.cc 
b/be/src/kudu/rpc/server_negotiation.cc
index 5e6d070..9a4bd91 100644
--- a/be/src/kudu/rpc/server_negotiation.cc
+++ b/be/src/kudu/rpc/server_negotiation.cc
@@ -57,7 +57,7 @@ using std::string;
 using std::unique_ptr;
 
 // Fault injection flags.
-DEFINE_double(rpc_inject_invalid_authn_token_ratio, 0,
+DEFINE_double_hidden(rpc_inject_invalid_authn_token_ratio, 0,
               "If set higher than 0, AuthenticateByToken() randomly injects "
               "errors replying with FATAL_INVALID_AUTHENTICATION_TOKEN code. "
               "The flag's value corresponds to the probability of the fault "
@@ -67,7 +67,7 @@ TAG_FLAG(rpc_inject_invalid_authn_token_ratio, unsafe);
 
 DECLARE_bool(rpc_encrypt_loopback_connections);
 
-DEFINE_string(trusted_subnets,
+DEFINE_string_hidden(trusted_subnets,
               
"127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16",
               "A trusted subnet whitelist. If set explicitly, all 
unauthenticated "
               "or unencrypted connections are prohibited except the ones from 
the "

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/service_if.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/service_if.cc b/be/src/kudu/rpc/service_if.cc
index 39e9ab5..5b14e1e 100644
--- a/be/src/kudu/rpc/service_if.cc
+++ b/be/src/kudu/rpc/service_if.cc
@@ -32,7 +32,7 @@
 // TODO remove this once we have fully cluster-tested this.
 // Despite being on by default, this is left in in case we discover
 // any issues in 0.10.0, we'll have an easy workaround to disable the feature.
-DEFINE_bool(enable_exactly_once, true, "Whether to enable exactly once 
semantics.");
+DEFINE_bool_hidden(enable_exactly_once, true, "Whether to enable exactly once 
semantics.");
 TAG_FLAG(enable_exactly_once, hidden);
 
 using google::protobuf::Message;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/service_queue-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/service_queue-test.cc 
b/be/src/kudu/rpc/service_queue-test.cc
index 0bcbd12..8619ea2 100644
--- a/be/src/kudu/rpc/service_queue-test.cc
+++ b/be/src/kudu/rpc/service_queue-test.cc
@@ -34,13 +34,13 @@ using std::string;
 using std::unique_ptr;
 using std::vector;
 
-DEFINE_int32(num_producers, 4,
+DEFINE_int32_hidden(num_producers, 4,
              "Number of producer threads");
 
-DEFINE_int32(num_consumers, 20,
+DEFINE_int32_hidden(num_consumers, 20,
              "Number of consumer threads");
 
-DEFINE_int32(max_queue_size, 50,
+DEFINE_int32_hidden(max_queue_size, 50,
              "Max queue length");
 
 namespace kudu {

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/rpc/transfer.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/rpc/transfer.cc b/be/src/kudu/rpc/transfer.cc
index d660869..da44355 100644
--- a/be/src/kudu/rpc/transfer.cc
+++ b/be/src/kudu/rpc/transfer.cc
@@ -33,7 +33,7 @@
 #include "kudu/util/net/sockaddr.h"
 #include "kudu/util/net/socket.h"
 
-DEFINE_int32(rpc_max_message_size, (50 * 1024 * 1024),
+DEFINE_int32_hidden(rpc_max_message_size, (50 * 1024 * 1024),
              "The maximum size of a message that any RPC that the server will 
accept. "
              "Must be at least 1MB.");
 TAG_FLAG(rpc_max_message_size, advanced);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/security/tls_context.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/security/tls_context.cc 
b/be/src/kudu/security/tls_context.cc
index ce7b3d8..2b9ba30 100644
--- a/be/src/kudu/security/tls_context.cc
+++ b/be/src/kudu/security/tls_context.cc
@@ -45,12 +45,12 @@ using strings::Substitute;
 using std::string;
 using std::unique_lock;
 
-DEFINE_int32(ipki_server_key_size, 2048,
+DEFINE_int32_hidden(ipki_server_key_size, 2048,
              "the number of bits for server cert's private key. The server 
cert "
              "is used for TLS connections to and from clients and other 
servers.");
 TAG_FLAG(ipki_server_key_size, experimental);
 
-DEFINE_string(rpc_tls_ciphers,
+DEFINE_string_hidden(rpc_tls_ciphers,
               // This is the "modern compatibility" cipher list of the Mozilla 
Security
               // Server Side TLS recommendations, accessed Feb. 2017, with the 
addition of
               // the non ECDH/DH AES cipher suites from the "intermediate 
compatibility"
@@ -70,7 +70,7 @@ DEFINE_string(rpc_tls_ciphers,
               "for more information.");
 TAG_FLAG(rpc_tls_ciphers, advanced);
 
-DEFINE_string(rpc_tls_min_protocol, "TLSv1",
+DEFINE_string_hidden(rpc_tls_min_protocol, "TLSv1",
               "The minimum protocol version to allow when for securing RPC "
               "connections with TLS. May be one of 'TLSv1', 'TLSv1.1', or "
               "'TLSv1.2'.");

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/security/token_signer.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/security/token_signer.cc 
b/be/src/kudu/security/token_signer.cc
index a60d116..2cccfdd 100644
--- a/be/src/kudu/security/token_signer.cc
+++ b/be/src/kudu/security/token_signer.cc
@@ -37,7 +37,7 @@
 #include "kudu/util/locks.h"
 #include "kudu/util/status.h"
 
-DEFINE_int32(tsk_num_rsa_bits, 2048,
+DEFINE_int32_hidden(tsk_num_rsa_bits, 2048,
              "Number of bits in RSA keys used for token signing.");
 TAG_FLAG(tsk_num_rsa_bits, experimental);
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/cache.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/cache.cc b/be/src/kudu/util/cache.cc
index c5954de..4eeecd1e 100644
--- a/be/src/kudu/util/cache.cc
+++ b/be/src/kudu/util/cache.cc
@@ -31,7 +31,7 @@
 #endif
 
 // Useful in tests that require accurate cache capacity accounting.
-DEFINE_bool(cache_force_single_shard, false,
+DEFINE_bool_hidden(cache_force_single_shard, false,
             "Override all cache implementations to use just one shard");
 TAG_FLAG(cache_force_single_shard, hidden);
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/debug/trace_event_impl.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/debug/trace_event_impl.cc 
b/be/src/kudu/util/debug/trace_event_impl.cc
index f976c87..a8734b8 100644
--- a/be/src/kudu/util/debug/trace_event_impl.cc
+++ b/be/src/kudu/util/debug/trace_event_impl.cc
@@ -30,7 +30,7 @@
 #include "kudu/util/flag_tags.h"
 #include "kudu/util/thread.h"
 
-DEFINE_string(trace_to_console, "",
+DEFINE_string_hidden(trace_to_console, "",
               "Trace pattern specifying which trace events should be dumped "
               "directly to the console");
 TAG_FLAG(trace_to_console, experimental);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/env_posix.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/env_posix.cc b/be/src/kudu/util/env_posix.cc
index 173092d..3148736 100644
--- a/be/src/kudu/util/env_posix.cc
+++ b/be/src/kudu/util/env_posix.cc
@@ -113,30 +113,30 @@
 } while ((nread) == 0 && ferror(stream) == EINTR)
 
 // See KUDU-588 for details.
-DEFINE_bool(env_use_fsync, false,
+DEFINE_bool_hidden(env_use_fsync, false,
             "Use fsync(2) instead of fdatasync(2) for synchronizing dirty "
             "data to disk.");
 TAG_FLAG(env_use_fsync, advanced);
 TAG_FLAG(env_use_fsync, evolving);
 
-DEFINE_bool(suicide_on_eio, true,
+DEFINE_bool_hidden(suicide_on_eio, true,
             "Kill the process if an I/O operation results in EIO");
 TAG_FLAG(suicide_on_eio, advanced);
 
-DEFINE_bool(never_fsync, false,
+DEFINE_bool_hidden(never_fsync, false,
             "Never fsync() anything to disk. This is used by certain test 
cases to "
             "speed up runtime. This is very unsafe to use in production.");
 TAG_FLAG(never_fsync, advanced);
 TAG_FLAG(never_fsync, unsafe);
 
-DEFINE_double(env_inject_io_error, 0.0,
+DEFINE_double_hidden(env_inject_io_error, 0.0,
               "Fraction of the time that certain I/O operations will fail");
 TAG_FLAG(env_inject_io_error, hidden);
 
-DEFINE_int32(env_inject_short_read_bytes, 0,
+DEFINE_int32_hidden(env_inject_short_read_bytes, 0,
              "The number of bytes less than the requested bytes to read");
 TAG_FLAG(env_inject_short_read_bytes, hidden);
-DEFINE_int32(env_inject_short_write_bytes, 0,
+DEFINE_int32_hidden(env_inject_short_write_bytes, 0,
              "The number of bytes less than the requested bytes to write");
 TAG_FLAG(env_inject_short_write_bytes, hidden);
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/env_util.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/env_util.cc b/be/src/kudu/util/env_util.cc
index e9117a4..9602919 100644
--- a/be/src/kudu/util/env_util.cc
+++ b/be/src/kudu/util/env_util.cc
@@ -38,7 +38,7 @@
 #include "kudu/util/path_util.h"
 #include "kudu/util/status.h"
 
-DEFINE_int64(disk_reserved_bytes_free_for_testing, -1,
+DEFINE_int64_hidden(disk_reserved_bytes_free_for_testing, -1,
              "For testing only! Set to number of bytes free on each 
filesystem. "
              "Set to -1 to disable this test-specific override");
 TAG_FLAG(disk_reserved_bytes_free_for_testing, runtime);
@@ -46,18 +46,18 @@ TAG_FLAG(disk_reserved_bytes_free_for_testing, unsafe);
 
 // We define some flags for testing purposes: Two prefixes and their associated
 // "bytes free" overrides.
-DEFINE_string(disk_reserved_override_prefix_1_path_for_testing, "",
+DEFINE_string_hidden(disk_reserved_override_prefix_1_path_for_testing, "",
               "For testing only! Specifies a prefix to override the visible 
'bytes free' on. "
               "Use --disk_reserved_override_prefix_1_bytes_free_for_testing to 
set the number of "
               "bytes free for this path prefix. Set to empty string to 
disable.");
-DEFINE_int64(disk_reserved_override_prefix_1_bytes_free_for_testing, -1,
+DEFINE_int64_hidden(disk_reserved_override_prefix_1_bytes_free_for_testing, -1,
              "For testing only! Set number of bytes free on the path prefix 
specified by "
              "--disk_reserved_override_prefix_1_path_for_testing. Set to -1 to 
disable.");
-DEFINE_string(disk_reserved_override_prefix_2_path_for_testing, "",
+DEFINE_string_hidden(disk_reserved_override_prefix_2_path_for_testing, "",
               "For testing only! Specifies a prefix to override the visible 
'bytes free' on. "
               "Use --disk_reserved_override_prefix_2_bytes_free_for_testing to 
set the number of "
               "bytes free for this path prefix. Set to empty string to 
disable.");
-DEFINE_int64(disk_reserved_override_prefix_2_bytes_free_for_testing, -1,
+DEFINE_int64_hidden(disk_reserved_override_prefix_2_bytes_free_for_testing, -1,
              "For testing only! Set number of bytes free on the path prefix 
specified by "
              "--disk_reserved_override_prefix_2_path_for_testing. Set to -1 to 
disable.");
 TAG_FLAG(disk_reserved_override_prefix_1_path_for_testing, unsafe);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/file_cache-stress-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/file_cache-stress-test.cc 
b/be/src/kudu/util/file_cache-stress-test.cc
index 966f202..7e47028 100644
--- a/be/src/kudu/util/file_cache-stress-test.cc
+++ b/be/src/kudu/util/file_cache-stress-test.cc
@@ -64,13 +64,13 @@
   } while (0);
 
 // This default value is friendly to many n-CPU configurations.
-DEFINE_int32(test_max_open_files, 192, "Maximum number of open files enforced "
+DEFINE_int32_hidden(test_max_open_files, 192, "Maximum number of open files 
enforced "
              "by the cache. Should be a multiple of the number of CPUs on the "
              "system.");
 
-DEFINE_int32(test_num_producer_threads, 1, "Number of producer threads");
-DEFINE_int32(test_num_consumer_threads, 4, "Number of consumer threads");
-DEFINE_int32(test_duration_secs, 2, "Number of seconds to run the test");
+DEFINE_int32_hidden(test_num_producer_threads, 1, "Number of producer 
threads");
+DEFINE_int32_hidden(test_num_consumer_threads, 4, "Number of consumer 
threads");
+DEFINE_int32_hidden(test_duration_secs, 2, "Number of seconds to run the 
test");
 
 using std::deque;
 using std::shared_ptr;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/file_cache.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/file_cache.cc b/be/src/kudu/util/file_cache.cc
index b8d17cf..57f9479 100644
--- a/be/src/kudu/util/file_cache.cc
+++ b/be/src/kudu/util/file_cache.cc
@@ -39,7 +39,7 @@
 #include "kudu/util/status.h"
 #include "kudu/util/thread.h"
 
-DEFINE_int32(file_cache_expiry_period_ms, 60 * 1000,
+DEFINE_int32_hidden(file_cache_expiry_period_ms, 60 * 1000,
              "Period of time (in ms) between removing expired file cache 
descriptors");
 TAG_FLAG(file_cache_expiry_period_ms, advanced);
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/flag_tags-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/flag_tags-test.cc 
b/be/src/kudu/util/flag_tags-test.cc
index 13ee535..ba58b8c 100644
--- a/be/src/kudu/util/flag_tags-test.cc
+++ b/be/src/kudu/util/flag_tags-test.cc
@@ -29,22 +29,22 @@
 
 DECLARE_bool(never_fsync);
 
-DEFINE_int32(flag_with_no_tags, 0, "test flag that has no tags");
+DEFINE_int32_hidden(flag_with_no_tags, 0, "test flag that has no tags");
 
-DEFINE_int32(flag_with_one_tag, 0, "test flag that has 1 tag");
+DEFINE_int32_hidden(flag_with_one_tag, 0, "test flag that has 1 tag");
 TAG_FLAG(flag_with_one_tag, stable);
 
-DEFINE_int32(flag_with_two_tags, 0, "test flag that has 2 tags");
+DEFINE_int32_hidden(flag_with_two_tags, 0, "test flag that has 2 tags");
 TAG_FLAG(flag_with_two_tags, evolving);
 TAG_FLAG(flag_with_two_tags, unsafe);
 
-DEFINE_bool(test_unsafe_flag, false, "an unsafe flag");
+DEFINE_bool_hidden(test_unsafe_flag, false, "an unsafe flag");
 TAG_FLAG(test_unsafe_flag, unsafe);
 
-DEFINE_bool(test_experimental_flag, false, "an experimental flag");
+DEFINE_bool_hidden(test_experimental_flag, false, "an experimental flag");
 TAG_FLAG(test_experimental_flag, experimental);
 
-DEFINE_bool(test_sensitive_flag, false, "a sensitive flag");
+DEFINE_bool_hidden(test_sensitive_flag, false, "a sensitive flag");
 TAG_FLAG(test_sensitive_flag, sensitive);
 
 using std::string;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/flag_validators-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/flag_validators-test.cc 
b/be/src/kudu/util/flag_validators-test.cc
index 3e7fb5b..6cb6ae3 100644
--- a/be/src/kudu/util/flag_validators-test.cc
+++ b/be/src/kudu/util/flag_validators-test.cc
@@ -26,10 +26,10 @@
 #include "kudu/util/logging.h"
 #include "kudu/util/test_util.h"
 
-DEFINE_string(grouped_0, "", "First flag to set.");
-DEFINE_string(grouped_1, "", "Second flag to set.");
-DEFINE_string(grouped_2, "", "Third flag to set.");
-DEFINE_string(grouped_3, "", "Fourth flag to set.");
+DEFINE_string_hidden(grouped_0, "", "First flag to set.");
+DEFINE_string_hidden(grouped_1, "", "Second flag to set.");
+DEFINE_string_hidden(grouped_2, "", "Third flag to set.");
+DEFINE_string_hidden(grouped_3, "", "Fourth flag to set.");
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/flags-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/flags-test.cc b/be/src/kudu/util/flags-test.cc
index dd5acd0..9c05eed 100644
--- a/be/src/kudu/util/flags-test.cc
+++ b/be/src/kudu/util/flags-test.cc
@@ -27,15 +27,15 @@
 #include "kudu/util/test_util.h"
 
 // Test gflags
-DEFINE_string(test_nondefault_ff, "default",
+DEFINE_string_hidden(test_nondefault_ff, "default",
              "Check if we track non defaults from flagfile");
-DEFINE_string(test_nondefault_explicit, "default",
+DEFINE_string_hidden(test_nondefault_explicit, "default",
              "Check if we track explicitly set non defaults");
-DEFINE_string(test_default_ff, "default",
+DEFINE_string_hidden(test_default_ff, "default",
              "Check if we track defaults from flagfile");
-DEFINE_string(test_default_explicit, "default",
+DEFINE_string_hidden(test_default_explicit, "default",
              "Check if we track explicitly set defaults");
-DEFINE_bool(test_sensitive_flag, false, "a sensitive flag");
+DEFINE_bool_hidden(test_sensitive_flag, false, "a sensitive flag");
 TAG_FLAG(test_sensitive_flag, sensitive);
 
 DECLARE_bool(never_fsync);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/flags.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/flags.cc b/be/src/kudu/util/flags.cc
index 8cf2c39..0047b96 100644
--- a/be/src/kudu/util/flags.cc
+++ b/be/src/kudu/util/flags.cc
@@ -55,7 +55,7 @@ using strings::Substitute;
 
 // Because every binary initializes its flags here, we use it as a convenient 
place
 // to offer some global flags as well.
-DEFINE_bool(dump_metrics_json, false,
+DEFINE_bool_hidden(dump_metrics_json, false,
             "Dump a JSON document describing all of the metrics which may be 
emitted "
             "by this binary.");
 TAG_FLAG(dump_metrics_json, hidden);
@@ -64,16 +64,16 @@ DECLARE_bool(enable_process_lifetime_heap_profiling);
 TAG_FLAG(enable_process_lifetime_heap_profiling, stable);
 TAG_FLAG(enable_process_lifetime_heap_profiling, advanced);
 
-DEFINE_string(heap_profile_path, "", "Output path to store heap profiles. If 
not set " \
+DEFINE_string_hidden(heap_profile_path, "", "Output path to store heap 
profiles. If not set " \
     "profiles are stored in /tmp/<process-name>.<pid>.<n>.heap.");
 TAG_FLAG(heap_profile_path, stable);
 TAG_FLAG(heap_profile_path, advanced);
 
-DEFINE_bool(disable_core_dumps, false, "Disable core dumps when this process 
crashes.");
+DEFINE_bool_hidden(disable_core_dumps, false, "Disable core dumps when this 
process crashes.");
 TAG_FLAG(disable_core_dumps, advanced);
 TAG_FLAG(disable_core_dumps, evolving);
 
-DEFINE_string(umask, "077",
+DEFINE_string_hidden(umask, "077",
               "The umask that will be used when creating files and 
directories. "
               "Permissions of top-level data directories will also be modified 
at "
               "start-up to conform to the given umask. Changing this value may 
"
@@ -98,21 +98,21 @@ static bool ValidateUmask(const char* /*flagname*/, const 
string& value) {
 
 DEFINE_validator(umask, &ValidateUmask);
 
-DEFINE_bool(unlock_experimental_flags, false,
+DEFINE_bool_hidden(unlock_experimental_flags, false,
             "Unlock flags marked as 'experimental'. These flags are not 
guaranteed to "
             "be maintained across releases of Kudu, and may enable features or 
behavior "
             "known to be unstable. Use at your own risk.");
 TAG_FLAG(unlock_experimental_flags, advanced);
 TAG_FLAG(unlock_experimental_flags, stable);
 
-DEFINE_bool(unlock_unsafe_flags, false,
+DEFINE_bool_hidden(unlock_unsafe_flags, false,
             "Unlock flags marked as 'unsafe'. These flags are not guaranteed 
to "
             "be maintained across releases of Kudu, and enable features or 
behavior "
             "known to be unsafe. Use at your own risk.");
 TAG_FLAG(unlock_unsafe_flags, advanced);
 TAG_FLAG(unlock_unsafe_flags, stable);
 
-DEFINE_string(redact, "all",
+DEFINE_string_hidden(redact, "all",
               "Comma-separated list of redactions. Supported options are 
'flag', "
               "'log', 'all', and 'none'. If 'flag' is specified, configuration 
flags which may "
               "include sensitive data will be redacted whenever server 
configuration "

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/kernel_stack_watchdog.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/kernel_stack_watchdog.cc 
b/be/src/kudu/util/kernel_stack_watchdog.cc
index 829431f..3f847c1 100644
--- a/be/src/kudu/util/kernel_stack_watchdog.cc
+++ b/be/src/kudu/util/kernel_stack_watchdog.cc
@@ -32,7 +32,7 @@
 #include "kudu/gutil/map-util.h"
 #include "kudu/gutil/strings/substitute.h"
 
-DEFINE_int32(hung_task_check_interval_ms, 200,
+DEFINE_int32_hidden(hung_task_check_interval_ms, 200,
              "Number of milliseconds in between checks for hung threads");
 TAG_FLAG(hung_task_check_interval_ms, hidden);
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/logging.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/logging.cc b/be/src/kudu/util/logging.cc
index 5b2db1b..82581b7 100644
--- a/be/src/kudu/util/logging.cc
+++ b/be/src/kudu/util/logging.cc
@@ -47,12 +47,12 @@
 DECLARE_string(log_filename);
 TAG_FLAG(log_filename, stable);
 
-DEFINE_bool(log_async, true,
+DEFINE_bool_hidden(log_async, true,
             "Enable asynchronous writing to log files. This improves "
             "latency and stability.");
 TAG_FLAG(log_async, hidden);
 
-DEFINE_int32(log_async_buffer_bytes_per_level, 2 * 1024 * 1024,
+DEFINE_int32_hidden(log_async_buffer_bytes_per_level, 2 * 1024 * 1024,
              "The number of bytes of buffer space used by each log "
              "level. Only relevant when --log_async is enabled.");
 TAG_FLAG(log_async_buffer_bytes_per_level, hidden);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/maintenance_manager.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/maintenance_manager.cc 
b/be/src/kudu/util/maintenance_manager.cc
index b410646..5ebefd4 100644
--- a/be/src/kudu/util/maintenance_manager.cc
+++ b/be/src/kudu/util/maintenance_manager.cc
@@ -40,38 +40,38 @@ using std::pair;
 using std::shared_ptr;
 using strings::Substitute;
 
-DEFINE_int32(maintenance_manager_num_threads, 1,
+DEFINE_int32_hidden(maintenance_manager_num_threads, 1,
              "Size of the maintenance manager thread pool. "
              "For spinning disks, the number of threads should "
              "not be above the number of devices.");
 TAG_FLAG(maintenance_manager_num_threads, stable);
 
-DEFINE_int32(maintenance_manager_polling_interval_ms, 250,
+DEFINE_int32_hidden(maintenance_manager_polling_interval_ms, 250,
        "Polling interval for the maintenance manager scheduler, "
        "in milliseconds.");
 TAG_FLAG(maintenance_manager_polling_interval_ms, hidden);
 
-DEFINE_int32(maintenance_manager_history_size, 8,
+DEFINE_int32_hidden(maintenance_manager_history_size, 8,
        "Number of completed operations the manager is keeping track of.");
 TAG_FLAG(maintenance_manager_history_size, hidden);
 
-DEFINE_bool(enable_maintenance_manager, true,
+DEFINE_bool_hidden(enable_maintenance_manager, true,
        "Enable the maintenance manager, runs compaction and tablet cleaning 
tasks.");
 TAG_FLAG(enable_maintenance_manager, unsafe);
 
-DEFINE_int64(log_target_replay_size_mb, 1024,
+DEFINE_int64_hidden(log_target_replay_size_mb, 1024,
              "The target maximum size of logs to be replayed at startup. If a 
tablet "
              "has in-memory operations that are causing more than this size of 
logs "
              "to be retained, then the maintenance manager will prioritize 
flushing "
              "these operations to disk.");
 TAG_FLAG(log_target_replay_size_mb, experimental);
 
-DEFINE_int64(data_gc_min_size_mb, 0,
+DEFINE_int64_hidden(data_gc_min_size_mb, 0,
              "The (exclusive) minimum number of megabytes of ancient data on "
              "disk, per tablet, needed to prioritize deletion of that data.");
 TAG_FLAG(data_gc_min_size_mb, experimental);
 
-DEFINE_double(data_gc_prioritization_prob, 0.5,
+DEFINE_double_hidden(data_gc_prioritization_prob, 0.5,
              "The probability that we will prioritize data GC over performance 
"
              "improvement operations. If set to 1.0, we will always prefer to "
              "delete old data before running performance improvement 
operations "

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/memory/arena-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/memory/arena-test.cc 
b/be/src/kudu/util/memory/arena-test.cc
index fc3a64d..95cb899 100644
--- a/be/src/kudu/util/memory/arena-test.cc
+++ b/be/src/kudu/util/memory/arena-test.cc
@@ -27,9 +27,9 @@
 #include "kudu/util/memory/memory.h"
 #include "kudu/util/mem_tracker.h"
 
-DEFINE_int32(num_threads, 16, "Number of threads to test");
-DEFINE_int32(allocs_per_thread, 10000, "Number of allocations each thread 
should do");
-DEFINE_int32(alloc_size, 4, "number of bytes in each allocation");
+DEFINE_int32_hidden(num_threads, 16, "Number of threads to test");
+DEFINE_int32_hidden(allocs_per_thread, 10000, "Number of allocations each 
thread should do");
+DEFINE_int32_hidden(alloc_size, 4, "number of bytes in each allocation");
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/memory/memory.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/memory/memory.cc 
b/be/src/kudu/util/memory/memory.cc
index 9db0464..2e223c7 100644
--- a/be/src/kudu/util/memory/memory.cc
+++ b/be/src/kudu/util/memory/memory.cc
@@ -38,7 +38,7 @@ using std::min;
 // TODO(onufry) - test whether the code still tests OK if we set this to true,
 // or remove this code and add a test that Google allocator does not change 
it's
 // contract - 16-aligned in -c opt and %16 == 8 in debug.
-DEFINE_bool(allocator_aligned_mode, false,
+DEFINE_bool_hidden(allocator_aligned_mode, false,
             "Use 16-byte alignment instead of 8-byte, "
             "unless explicitly specified otherwise - to boost SIMD");
 TAG_FLAG(allocator_aligned_mode, hidden);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/metrics.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/metrics.cc b/be/src/kudu/util/metrics.cc
index 079bf89..5e9ab6c 100644
--- a/be/src/kudu/util/metrics.cc
+++ b/be/src/kudu/util/metrics.cc
@@ -36,7 +36,7 @@
 #include "kudu/util/locks.h"
 #include "kudu/util/status.h"
 
-DEFINE_int32(metrics_retirement_age_ms, 120 * 1000,
+DEFINE_int32_hidden(metrics_retirement_age_ms, 120 * 1000,
              "The minimum number of milliseconds a metric will be kept for 
after it is "
              "no longer active. (Advanced option)");
 TAG_FLAG(metrics_retirement_age_ms, runtime);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/minidump.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/minidump.cc b/be/src/kudu/util/minidump.cc
index a1be164..e96227a 100644
--- a/be/src/kudu/util/minidump.cc
+++ b/be/src/kudu/util/minidump.cc
@@ -54,7 +54,7 @@ static constexpr bool kMinidumpPlatformSupported = false;
 
 DECLARE_string(log_dir);
 
-DEFINE_bool(enable_minidumps, kMinidumpPlatformSupported,
+DEFINE_bool_hidden(enable_minidumps, kMinidumpPlatformSupported,
             "Whether to enable minidump generation upon process crash or 
SIGUSR1. "
             "Currently only supported on Linux systems.");
 TAG_FLAG(enable_minidumps, advanced);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/mt-hdr_histogram-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/mt-hdr_histogram-test.cc 
b/be/src/kudu/util/mt-hdr_histogram-test.cc
index 879c5e3..9479bc1 100644
--- a/be/src/kudu/util/mt-hdr_histogram-test.cc
+++ b/be/src/kudu/util/mt-hdr_histogram-test.cc
@@ -26,9 +26,9 @@
 #include "kudu/util/test_util.h"
 #include "kudu/util/thread.h"
 
-DEFINE_int32(histogram_test_num_threads, 16,
+DEFINE_int32_hidden(histogram_test_num_threads, 16,
     "Number of threads to spawn for mt-hdr_histogram test");
-DEFINE_uint64(histogram_test_num_increments_per_thread, 100000LU,
+DEFINE_uint64_hidden(histogram_test_num_increments_per_thread, 100000LU,
     "Number of times to call Increment() per thread in mt-hdr_histogram test");
 
 using std::vector;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/mt-metrics-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/mt-metrics-test.cc 
b/be/src/kudu/util/mt-metrics-test.cc
index b4512fb..a559f99 100644
--- a/be/src/kudu/util/mt-metrics-test.cc
+++ b/be/src/kudu/util/mt-metrics-test.cc
@@ -32,7 +32,7 @@
 #include "kudu/util/test_util.h"
 #include "kudu/util/thread.h"
 
-DEFINE_int32(mt_metrics_test_num_threads, 4,
+DEFINE_int32_hidden(mt_metrics_test_num_threads, 4,
              "Number of threads to spawn in mt metrics tests");
 
 METRIC_DEFINE_entity(test_entity);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/mutex.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/mutex.cc b/be/src/kudu/util/mutex.cc
index bd9539b..4148480 100644
--- a/be/src/kudu/util/mutex.cc
+++ b/be/src/kudu/util/mutex.cc
@@ -34,7 +34,7 @@ using strings::Substitute;
 using strings::SubstituteAndAppend;
 
 #ifndef NDEBUG
-DEFINE_bool(debug_mutex_collect_stacktrace, false,
+DEFINE_bool_hidden(debug_mutex_collect_stacktrace, false,
             "Whether to collect a stacktrace on Mutex contention in a DEBUG 
build");
 TAG_FLAG(debug_mutex_collect_stacktrace, advanced);
 TAG_FLAG(debug_mutex_collect_stacktrace, hidden);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/net/dns_resolver.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/net/dns_resolver.cc 
b/be/src/kudu/util/net/dns_resolver.cc
index 4c37a95..931598e 100644
--- a/be/src/kudu/util/net/dns_resolver.cc
+++ b/be/src/kudu/util/net/dns_resolver.cc
@@ -27,7 +27,7 @@
 #include "kudu/util/net/net_util.h"
 #include "kudu/util/net/sockaddr.h"
 
-DEFINE_int32(dns_num_resolver_threads, 1, "The number of threads to use for 
DNS resolution");
+DEFINE_int32_hidden(dns_num_resolver_threads, 1, "The number of threads to use 
for DNS resolution");
 TAG_FLAG(dns_num_resolver_threads, advanced);
 
 using std::vector;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/net/net_util.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/net/net_util.cc b/be/src/kudu/util/net/net_util.cc
index aca1ae2..7c77a25 100644
--- a/be/src/kudu/util/net/net_util.cc
+++ b/be/src/kudu/util/net/net_util.cc
@@ -53,7 +53,7 @@
 #define HOST_NAME_MAX 64
 #endif
 
-DEFINE_bool(fail_dns_resolution, false, "Whether to fail all dns resolution, 
for tests.");
+DEFINE_bool_hidden(fail_dns_resolution, false, "Whether to fail all dns 
resolution, for tests.");
 TAG_FLAG(fail_dns_resolution, hidden);
 
 using std::unordered_set;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/net/socket.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/net/socket.cc b/be/src/kudu/util/net/socket.cc
index cc0836b..60f3d4b 100644
--- a/be/src/kudu/util/net/socket.cc
+++ b/be/src/kudu/util/net/socket.cc
@@ -43,13 +43,13 @@
 #include "kudu/util/random_util.h"
 #include "kudu/util/subprocess.h"
 
-DEFINE_string(local_ip_for_outbound_sockets, "",
+DEFINE_string_hidden(local_ip_for_outbound_sockets, "",
               "IP to bind to when making outgoing socket connections. "
               "This must be an IP address of the form A.B.C.D, not a hostname. 
"
               "Advanced parameter, subject to change.");
 TAG_FLAG(local_ip_for_outbound_sockets, experimental);
 
-DEFINE_bool(socket_inject_short_recvs, false,
+DEFINE_bool_hidden(socket_inject_short_recvs, false,
             "Inject short recv() responses which return less data than "
             "requested");
 TAG_FLAG(socket_inject_short_recvs, hidden);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/nvm_cache.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/nvm_cache.cc b/be/src/kudu/util/nvm_cache.cc
index 678aa87..92a1e50 100644
--- a/be/src/kudu/util/nvm_cache.cc
+++ b/be/src/kudu/util/nvm_cache.cc
@@ -42,19 +42,19 @@
 #include "kudu/util/locks.h"
 #include "kudu/util/metrics.h"
 
-DEFINE_string(nvm_cache_path, "/vmem",
+DEFINE_string_hidden(nvm_cache_path, "/vmem",
               "The path at which the NVM cache will try to allocate its 
memory. "
               "This can be a tmpfs or ramfs for testing purposes.");
 TAG_FLAG(nvm_cache_path, experimental);
 
-DEFINE_int32(nvm_cache_allocation_retry_count, 10,
+DEFINE_int32_hidden(nvm_cache_allocation_retry_count, 10,
              "The number of times that the NVM cache will retry attempts to 
allocate "
              "memory for new entries. In between attempts, a cache entry will 
be "
              "evicted.");
 TAG_FLAG(nvm_cache_allocation_retry_count, advanced);
 TAG_FLAG(nvm_cache_allocation_retry_count, experimental);
 
-DEFINE_bool(nvm_cache_simulate_allocation_failure, false,
+DEFINE_bool_hidden(nvm_cache_simulate_allocation_failure, false,
             "If true, the NVM cache will inject failures in calls to 
vmem_malloc "
             "for testing.");
 TAG_FLAG(nvm_cache_simulate_allocation_failure, unsafe);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/process_memory.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/process_memory.cc 
b/be/src/kudu/util/process_memory.cc
index 59fab51..1fab594 100644
--- a/be/src/kudu/util/process_memory.cc
+++ b/be/src/kudu/util/process_memory.cc
@@ -31,18 +31,18 @@
 #include "kudu/util/random.h"
 #include "kudu/util/striped64.h"
 
-DEFINE_int64(memory_limit_hard_bytes, 0,
+DEFINE_int64_hidden(memory_limit_hard_bytes, 0,
              "Maximum amount of memory this daemon should use, in bytes. "
              "A value of 0 autosizes based on the total system memory. "
              "A value of -1 disables all memory limiting.");
 TAG_FLAG(memory_limit_hard_bytes, stable);
 
-DEFINE_int32(memory_pressure_percentage, 60,
+DEFINE_int32_hidden(memory_pressure_percentage, 60,
              "Percentage of the hard memory limit that this daemon may "
              "consume before flushing of in-memory data becomes prioritized.");
 TAG_FLAG(memory_pressure_percentage, advanced);
 
-DEFINE_int32(memory_limit_soft_percentage, 80,
+DEFINE_int32_hidden(memory_limit_soft_percentage, 80,
              "Percentage of the hard memory limit that this daemon may "
              "consume before memory throttling of writes begins. The greater "
              "the excess, the higher the chance of throttling. In general, a "
@@ -50,13 +50,13 @@ DEFINE_int32(memory_limit_soft_percentage, 80,
              "decreased throughput, and vice versa for a higher soft limit.");
 TAG_FLAG(memory_limit_soft_percentage, advanced);
 
-DEFINE_int32(memory_limit_warn_threshold_percentage, 98,
+DEFINE_int32_hidden(memory_limit_warn_threshold_percentage, 98,
              "Percentage of the hard memory limit that this daemon may "
              "consume before WARNING level messages are periodically logged.");
 TAG_FLAG(memory_limit_warn_threshold_percentage, advanced);
 
 #ifdef TCMALLOC_ENABLED
-DEFINE_int32(tcmalloc_max_free_bytes_percentage, 10,
+DEFINE_int32_hidden(tcmalloc_max_free_bytes_percentage, 10,
              "Maximum percentage of the RSS that tcmalloc is allowed to use 
for "
              "reserved but unallocated memory.");
 TAG_FLAG(tcmalloc_max_free_bytes_percentage, advanced);

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/spinlock_profiling.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/spinlock_profiling.cc 
b/be/src/kudu/util/spinlock_profiling.cc
index 001f8d5..197aad7 100644
--- a/be/src/kudu/util/spinlock_profiling.cc
+++ b/be/src/kudu/util/spinlock_profiling.cc
@@ -34,7 +34,7 @@
 #include "kudu/util/striped64.h"
 #include "kudu/util/trace.h"
 
-DEFINE_int32(lock_contention_trace_threshold_cycles,
+DEFINE_int32_hidden(lock_contention_trace_threshold_cycles,
              2000000, // 2M cycles should be about 1ms
              "If acquiring a spinlock takes more than this number of "
              "cycles, and a Trace is currently active, then the current "

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/striped64-test.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/striped64-test.cc 
b/be/src/kudu/util/striped64-test.cc
index fee07ca..f315102 100644
--- a/be/src/kudu/util/striped64-test.cc
+++ b/be/src/kudu/util/striped64-test.cc
@@ -26,8 +26,8 @@
 #include "kudu/util/thread.h"
 
 // These flags are used by the multi-threaded tests, can be used for 
microbenchmarking.
-DEFINE_int32(num_operations, 10*1000, "Number of operations to perform");
-DEFINE_int32(num_threads, 2, "Number of worker threads");
+DEFINE_int32_hidden(num_operations, 10*1000, "Number of operations to 
perform");
+DEFINE_int32_hidden(num_threads, 2, "Number of worker threads");
 
 namespace kudu {
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/test_main.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/test_main.cc b/be/src/kudu/util/test_main.cc
index fa88f21..5989154 100644
--- a/be/src/kudu/util/test_main.cc
+++ b/be/src/kudu/util/test_main.cc
@@ -30,10 +30,10 @@
 #include "kudu/util/status.h"
 #include "kudu/util/test_util.h"
 
-DEFINE_int32(test_timeout_after, 0,
+DEFINE_int32_hidden(test_timeout_after, 0,
              "Maximum total seconds allowed for all unit tests in the suite. 
Default: disabled");
 
-DEFINE_int32(stress_cpu_threads, 0,
+DEFINE_int32_hidden(stress_cpu_threads, 0,
              "Number of threads to start that burn CPU in an attempt to "
              "stimulate race conditions");
 

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ab0bc9ee/be/src/kudu/util/test_util.cc
----------------------------------------------------------------------
diff --git a/be/src/kudu/util/test_util.cc b/be/src/kudu/util/test_util.cc
index 50c80c6..85293c0 100644
--- a/be/src/kudu/util/test_util.cc
+++ b/be/src/kudu/util/test_util.cc
@@ -34,11 +34,11 @@
 #include "kudu/util/random.h"
 #include "kudu/util/spinlock_profiling.h"
 
-DEFINE_string(test_leave_files, "on_failure",
+DEFINE_string_hidden(test_leave_files, "on_failure",
               "Whether to leave test files around after the test run. "
               " Valid values are 'always', 'on_failure', or 'never'");
 
-DEFINE_int32(test_random_seed, 0, "Random seed to use for randomized tests");
+DEFINE_int32_hidden(test_random_seed, 0, "Random seed to use for randomized 
tests");
 
 using std::string;
 using std::vector;

Reply via email to