You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by st...@apache.org on 2021/03/25 01:04:31 UTC
[impala] 01/02: IMPALA-10604: Allow setting KuduClient's verbose
log level directly
This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 452c2f1f7f9cc4c8472ab38949e9990281dcc3a3
Author: Thomas Tauber-Marshall <tm...@cloudera.com>
AuthorDate: Tue Mar 23 14:42:28 2021 -0700
IMPALA-10604: Allow setting KuduClient's verbose log level directly
This patch adds a flag --kudu_client_v which allows setting the
verbose logging level for the KuduClient to a value other than the
level for the rest of Impala (set by -v) in order to enable debugging
of issues in the KuduClient without producing the enormous amount of
logging that comes with setting a high -v value on all of Impala.
Testing:
- Manually set --kudu_client_v and confirmed that the expected logging
is produced.
Change-Id: Ib39358709ee714b8cdffd72a0ee58f66d5fab37e
Reviewed-on: http://gerrit.cloudera.org:8080/17222
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
be/src/exec/kudu-util.cc | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/be/src/exec/kudu-util.cc b/be/src/exec/kudu-util.cc
index cb40f69..a623273 100644
--- a/be/src/exec/kudu-util.cc
+++ b/be/src/exec/kudu-util.cc
@@ -48,6 +48,10 @@ using DataType = kudu::client::KuduColumnSchema::DataType;
DEFINE_int32(kudu_client_num_reactor_threads, 4,
"Number of threads the Kudu client can use to send rpcs to Kudu. Must be > 0.");
+DEFINE_int32(kudu_client_v, -1,
+ "If >= 0, used to set the verbose logging level on the Kudu client instead of using "
+ "the value of -v");
+
DECLARE_bool(disable_kudu);
DECLARE_int32(kudu_client_rpc_timeout_ms);
DECLARE_int32(kudu_client_connection_negotiation_timeout_ms);
@@ -126,7 +130,11 @@ void InitKuduLogging() {
static kudu::client::KuduLoggingFunctionCallback<void*> log_cb(&LogKuduMessage, NULL);
kudu::client::InstallLoggingCallback(&log_cb);
// Kudu client logging is more noisy than Impala logging, log at v-1.
- kudu::client::SetVerboseLogLevel(std::max(0, FLAGS_v - 1));
+ if (FLAGS_kudu_client_v >= 0) {
+ kudu::client::SetVerboseLogLevel(FLAGS_kudu_client_v);
+ } else {
+ kudu::client::SetVerboseLogLevel(std::max(0, FLAGS_v - 1));
+ }
}
ColumnType KuduDataTypeToColumnType(