This is an automated email from the ASF dual-hosted git repository.

dbecker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new cd9f3f578 IMPALA-11435: Suppress logging for 'thrift' in impala-shell
cd9f3f578 is described below

commit cd9f3f578ef1bceeb5c48354fb9d2d6292ff5155
Author: Peter Rozsa <[email protected]>
AuthorDate: Fri Mar 31 16:26:49 2023 +0200

    IMPALA-11435: Suppress logging for 'thrift' in impala-shell
    
    This change removes the "No handlers could be found for logger
    "thrift.transport.sslcompat" notification from impala-shell when SSL is
    enabled, by adding a NullHandler to logger 'thrift'.
    
    Change-Id: Idaa0871751969ec3a3aa8b44fe35f0743c03c547
    Reviewed-on: http://gerrit.cloudera.org:8080/19671
    Reviewed-by: Daniel Becker <[email protected]>
    Reviewed-by: Joe McDonnell <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 shell/impala_shell.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/shell/impala_shell.py b/shell/impala_shell.py
index 066dcb0ad..6e6d38c44 100755
--- a/shell/impala_shell.py
+++ b/shell/impala_shell.py
@@ -25,6 +25,7 @@ from compatibility import _xrange as xrange
 import cmd
 import errno
 import getpass
+import logging
 import os
 import prettytable
 import random
@@ -2173,6 +2174,9 @@ 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:

Reply via email to