Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
sentry_sdk
/
integrations
/
spark
/
__pycache__
[ HOME ]
Exec
Submit
spark_driver.cpython-312.pyc
� w�/i% � �� � d dl Z d dlmZ d dlmZmZ d dlmZ erd dlmZ d dlm Z d dl mZmZ d dl mZ G d � d e� Zd� Zd� Zd � Zd� Zd� Zd� Z G d� d� Z G d� de� Zd� Zy)� N)�Integration)�capture_internal_exceptions�ensure_integration_enabled)� TYPE_CHECKING)�Any)�Optional)�Event�Hint��SparkContextc � � e Zd ZdZed� � Zy)�SparkIntegration�sparkc � � t � y �N)�_setup_sentry_tracing� � �Y/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/spark/spark_driver.py� setup_oncezSparkIntegration.setup_once s � � �r N)�__name__� __module__�__qualname__� identifier�staticmethodr r r r r r s � ��J�� � � r r c � � ddl m} | j }|r9|j d|j � |j d|j � yy)z� Set properties in driver that propagate to worker processes, allowing for workers to have access to those properties. This allows worker integration to have access to app_name and application_id. r r �sentry_app_name�sentry_application_idN)�pysparkr �_active_spark_context�setLocalProperty�appName� applicationId)r � spark_contexts r �_set_app_propertiesr% sP � � %� �6�6�M���&�&���!�!� � �&�&�#��'�'� � r c � � ddl m} | j } ||� t � }| j j � j |� y)zA Start java gateway server to add custom `SparkListener` r )�ensure_callback_server_startedN)�pyspark.java_gatewayr'