Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chi-yelp committed Oct 10, 2024
1 parent 4b1d6f4 commit 7ad9da0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions service_configuration_lib/spark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,11 +1109,13 @@ def get_spark_conf(
spark_app_base_name
)

# Pick a port from a pre-defined port range, which will then be used by our Jupyter
# server metric aggregator API. The aggregator API collects Prometheus metrics from multiple
# Spark sessions and exposes them through a single endpoint.
ui_port: int = self.spark_constants.get('preferred_spark_ui_port_start', EPHEMERAL_PORT_START)
if not self.is_driver_on_k8s_tron:
if self.is_driver_on_k8s_tron:
# For Tron-launched driver on k8s, we use a static Spark UI port
ui_port: int = self.spark_constants.get('preferred_spark_ui_port_start', EPHEMERAL_PORT_START)
else:
# Pick a port from a pre-defined port range, which will then be used by our Jupyter
# server metric aggregator API. The aggregator API collects Prometheus metrics from multiple
# Spark sessions and exposes them through a single endpoint.
try:
ui_port = int(
(spark_opts_from_env or {}).get('spark.ui.port') or
Expand Down

0 comments on commit 7ad9da0

Please sign in to comment.