Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PECOBLR-86 improve logging on python driver#556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletionssrc/databricks/sql/client.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -214,6 +214,12 @@ def read(self) -> Optional[OAuthToken]:
# use_cloud_fetch
# Enable use of cloud fetch to extract large query results in parallel via cloud storage

logger.debug(
"Connection.__init__(server_hostname=%s, http_path=%s)",
server_hostname,
http_path,
)

if access_token:
access_token_kv = {"access_token": access_token}
kwargs = {**kwargs, **access_token_kv}
Expand DownExpand Up@@ -787,6 +793,9 @@ def execute(

:returns self
"""
logger.debug(
"Cursor.execute(operation=%s, parameters=%s)", operation, parameters
)

param_approach = self._determine_parameter_approach(parameters)
if param_approach == ParameterApproach.NONE:
Expand Down
17 changes: 17 additions & 0 deletionssrc/databricks/sql/thrift_backend.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,6 +131,13 @@ def __init__(
# max_download_threads
# Number of threads for handling cloud fetch downloads. Defaults to 10

logger.debug(
"ThriftBackend.__init__(server_hostname=%s, port=%s, http_path=%s)",
server_hostname,
port,
http_path,
)

port = port or 443
if kwargs.get("_connection_uri"):
uri = kwargs.get("_connection_uri")
Expand DownExpand Up@@ -390,6 +397,8 @@ def attempt_request(attempt):

# TODO: don't use exception handling for GOS polling...

logger.error("ThriftBackend.attempt_request: HTTPError: %s", err)

gos_name = TCLIServiceClient.GetOperationStatus.__name__
if method.__name__ == gos_name:
delay_default = (
Expand DownExpand Up@@ -434,6 +443,7 @@ def attempt_request(attempt):
else:
logger.warning(log_string)
except Exception as err:
logger.error("ThriftBackend.attempt_request: Exception: %s", err)
error = err
retry_delay = extract_retry_delay(attempt)
error_message = ThriftBackend._extract_error_message_from_headers(
Expand DownExpand Up@@ -888,6 +898,12 @@ def execute_command(
):
assert session_handle is not None

logger.debug(
"ThriftBackend.execute_command(operation=%s, session_handle=%s)",
operation,
session_handle,
)

spark_arrow_types = ttypes.TSparkArrowTypes(
timestampAsArrow=self._use_arrow_native_timestamps,
decimalAsArrow=self._use_arrow_native_decimals,
Expand DownExpand Up@@ -1074,6 +1090,7 @@ def fetch_results(
return queue, resp.hasMoreRows

def close_command(self, op_handle):
logger.debug("ThriftBackend.close_command(op_handle=%s)", op_handle)
req = ttypes.TCloseOperationReq(operationHandle=op_handle)
resp = self.make_request(self._client.CloseOperation, req)
return resp.status
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp