@@ -133,6 +133,13 @@ def __init__(
133133 # max_download_threads
134134 # Number of threads for handling cloud fetch downloads. Defaults to 10
135135
136+ logger .debug (
137+ "ThriftBackend.__init__(server_hostname=%s, port=%s, http_path=%s)" ,
138+ server_hostname ,
139+ port ,
140+ http_path ,
141+ )
142+
136143 port = port or 443
137144 if kwargs .get ("_connection_uri" ):
138145 uri = kwargs .get ("_connection_uri" )
@@ -404,6 +411,8 @@ def attempt_request(attempt):
404411
405412 # TODO: don't use exception handling for GOS polling...
406413
414+ logger .error ("ThriftBackend.attempt_request: HTTPError: %s" , err )
415+
407416 gos_name = TCLIServiceClient .GetOperationStatus .__name__
408417 if method .__name__ == gos_name :
409418 delay_default = (
@@ -448,6 +457,7 @@ def attempt_request(attempt):
448457 else :
449458 logger .warning (log_string )
450459 except Exception as err :
460+ logger .error ("ThriftBackend.attempt_request: Exception: %s" , err )
451461 error = err
452462 retry_delay = extract_retry_delay (attempt )
453463 error_message = (
@@ -914,6 +924,12 @@ def execute_command(
914924 ):
915925 assert session_handle is not None
916926
927+ logger .debug (
928+ "ThriftBackend.execute_command(operation=%s, session_handle=%s)" ,
929+ operation ,
930+ session_handle ,
931+ )
932+
917933 spark_arrow_types = ttypes .TSparkArrowTypes (
918934 timestampAsArrow = self ._use_arrow_native_timestamps ,
919935 decimalAsArrow = self ._use_arrow_native_decimals ,
@@ -1150,6 +1166,7 @@ def fetch_results(
11501166 return queue , resp .hasMoreRows
11511167
11521168 def close_command (self , op_handle ):
1169+ logger .debug ("ThriftBackend.close_command(op_handle=%s)" , op_handle )
11531170 req = ttypes .TCloseOperationReq (operationHandle = op_handle )
11541171 resp = self .make_request (self ._client .CloseOperation , req )
11551172 return resp .status
0 commit comments