This is an automated email from the ASF dual-hosted git repository. wzhou pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 9727b46f3b13406a1970501db2ca06bb065719fd Author: Vincent Tran <[email protected]> AuthorDate: Wed Jun 14 14:06:44 2023 -0700 IMPALA-11435: Fixup - Suppress logging for 'thrift' in impala-shell Commit cd9f3f578 aims to suppres logging for the 'thrift' library within impala-shell. However, it does not work in all case. This change moves the fix into the 'main' function, which suppresses the unwanted messagge. Tested by connecting through impala-shell with Python2.7 and Python3.6 with SSL enabled. Change-Id: I4de95b1b67abe9a0b4637910b0894addddda23d5 Reviewed-on: http://gerrit.cloudera.org:8080/20074 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- shell/impala_shell.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/impala_shell.py b/shell/impala_shell.py index 5e1c4f918..a0896f916 100755 --- a/shell/impala_shell.py +++ b/shell/impala_shell.py @@ -2254,9 +2254,6 @@ def impala_shell_main(): intro = get_intro(options) - # Suppressing unwanted notifications from Thrift - logging.getLogger('thrift').addHandler(logging.NullHandler()) - with ImpalaShell(options, query_options) as shell: while shell.is_alive: try: @@ -2295,6 +2292,8 @@ def impala_shell_main(): if __name__ == "__main__": + # Suppressing unwanted notifications from Thrift + logging.getLogger('thrift').addHandler(logging.NullHandler()) try: impala_shell_main() except FatalShellException:
