Skip to content

Commit d1c9a64

Browse files
authored
Fix formatting (#125)
1 parent c07c70a commit d1c9a64

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/smspark/bootstrapper.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,9 @@ def get_yarn_spark_resource_config(
417417
# default parallelism
418418
default_parallelism = executor_count_total * executor_cores * 2
419419
# total memory for one executor on the instance, leave 1GB for the Hadoop daemons
420-
total_executor_memory = int((reduced_instance_mem_mb - constants.HADOOP_DAEMONS_MEM_MB) / executor_count_per_instance)
420+
total_executor_memory = int(
421+
(reduced_instance_mem_mb - constants.HADOOP_DAEMONS_MEM_MB) / executor_count_per_instance
422+
)
421423
# executor memory MB (90% of the total executor mem)
422424
executor_mem_mb = int(total_executor_memory * constants.EXECUTOR_MEM_INSTANCE_MEM_RATIO_ADV)
423425
# executor memory overhead MB (10% of the total executor mem)
@@ -426,11 +428,7 @@ def get_yarn_spark_resource_config(
426428
driver_mem_mb = executor_mem_mb
427429
driver_mem_overhead_mb = executor_mem_overhead_mb
428430
else:
429-
raise ValueError(
430-
"Could not determine Spark configuration mode: {}.".format(
431-
spark_config_mode
432-
)
433-
)
431+
raise ValueError("Could not determine Spark configuration mode: {}.".format(spark_config_mode))
434432

435433
driver_gc_config = (
436434
"-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:MaxHeapFreeRatio=70 "

0 commit comments

Comments
 (0)