Skip to content
Merged
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
12 changes: 1 addition & 11 deletions service_configuration_lib/spark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,19 +487,9 @@ def get_dra_configs(self, spark_opts: Dict[str, str]) -> Dict[str, str]:
cached_executor_idle_timeout,
)

# Min executors
# Spark defaults
min_executors = int(spark_opts.get('spark.dynamicAllocation.minExecutors', 0))

# Initial executors for Jupyter
initial_executors = int(spark_opts.get('spark.dynamicAllocation.initialExecutors', min_executors))
if is_jupyterhub and 'spark.dynamicAllocation.initialExecutors' not in spark_opts:
initial_executors = int(spark_opts.get('spark.dynamicAllocation.minExecutors', 0))
spark_opts['spark.dynamicAllocation.initialExecutors'] = str(initial_executors)
log.info(
f'\nSetting {TextColors.yellow("spark.dynamicAllocation.initialExecutors")} as {initial_executors}. '
f'If you wish to change the value of initial executors, please provide the exact value of '
f'spark.dynamicAllocation.initialExecutors in your spark args\n',
)

# Max executors
if 'spark.dynamicAllocation.maxExecutors' not in spark_opts:
Expand Down