Skip to content
Open
Changes from all 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
8 changes: 8 additions & 0 deletions google/cloud/dataproc_spark_connect/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,14 @@ def stop(self, terminate: Optional[bool] = None) -> None:
>>> spark.stop(terminate=False)
"""
with DataprocSparkSession._lock:
# Clean up any remaining progress bars from interrupted operations
for pbar in DataprocSparkSession._execution_progress_bar.values():
try:
pbar.close()
except Exception:
pass
DataprocSparkSession._execution_progress_bar.clear()

if DataprocSparkSession._active_s8s_session_id is not None:
# Determine if we should terminate the server-side session
if terminate is None:
Expand Down
Loading