Skip to content

Commit

Permalink
set config at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed Apr 25, 2024
1 parent f003af0 commit 593c2f7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/tpch/test_pyspark.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,12 @@ def spark_setup(cluster, local, enable_shuffle_option):
# which causes it to crash when collecting results
.config("spark.driver.memory", "10g")
)
if enable_shuffle_option:
spark.config("spark.sql.shuffle.partitions", "auto")
spark = spark.getOrCreate()
spark_dashboard = parse_url("http://localhost:4040")
else:
cfg = {}
if enable_shuffle_option:
cfg["spark.sql.shuffle.partitions"] = "auto"
spark = cluster.get_spark(
executor_memory_factor=0.8,
worker_memory_factor=0.9,
spark_connect_config=cfg,
)
# Available on coiled>=1.12.4
if not hasattr(cluster, "_spark_dashboard"):
Expand All @@ -109,6 +103,7 @@ def spark_setup(cluster, local, enable_shuffle_option):
spark_dashboard = parse_url(cluster._spark_dashboard)

try:
spark.conf.set("spark.sql.shuffle.partitions", "auto")
spark._spark_dashboard: Url = spark_dashboard

# warm start
Expand Down

0 comments on commit 593c2f7

Please sign in to comment.