Skip to content

Commit 1f8fd78

Browse files
committed
Update SparkApp configuration and test case for notebook path validation
1 parent c8e9772 commit 1f8fd78

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

server/app/services/spark_app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ def get_spark_app_config_by_notebook_path(notbook_path: str = None):
5959
# Default spark app config
6060
spark_app_config = {
6161
'spark.driver.memory': '1g',
62-
'spark.driver.cores': '1',
62+
'spark.driver.cores': 1,
6363
'spark.executor.memory': '1g',
64-
'spark.executor.cores': '1',
65-
'spark.executor.instances': '1',
66-
'spark.dynamicAllocation.enabled': 'false',
64+
'spark.executor.cores': 1,
65+
'spark.executor.instances': 1,
66+
'spark.dynamicAllocation.enabled': False,
6767
}
6868

6969
return Response(

server/tests/services/test_spark_app_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ def test_update_spark_app_config(self):
9292
# Update spark app config
9393
data = {
9494
'spark.driver.memory': '2g',
95-
'spark.driver.cores': '1',
95+
'spark.driver.cores': 1,
9696
'spark.executor.memory': '2g',
97-
'spark.executor.cores': '2',
98-
'spark.executor.instances': '2',
99-
'spark.dynamicAllocation.enabled': 'true',
97+
'spark.executor.cores': 2,
98+
'spark.executor.instances': 2,
99+
'spark.dynamicAllocation.enabled': True,
100100
}
101101

102102
response_0 = SparkApp.update_spark_app_config_by_notebook_path(None, data=data)

0 commit comments

Comments
 (0)