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 <daniel.becker@cloudera.com>
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Peter Rozsa
2023-03-31 16:26:49 +02:00
committed by Daniel Becker
parent 826b113fd7
commit cd9f3f578e

View File

@@ -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: