Skip to content

Commit

Permalink
Update SparkApp configuration and test case for notebook path validation
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwenyihust committed Aug 22, 2024
1 parent c8e9772 commit 1f8fd78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions server/app/services/spark_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def get_spark_app_config_by_notebook_path(notbook_path: str = None):
# Default spark app config
spark_app_config = {
'spark.driver.memory': '1g',
'spark.driver.cores': '1',
'spark.driver.cores': 1,
'spark.executor.memory': '1g',
'spark.executor.cores': '1',
'spark.executor.instances': '1',
'spark.dynamicAllocation.enabled': 'false',
'spark.executor.cores': 1,
'spark.executor.instances': 1,
'spark.dynamicAllocation.enabled': False,
}

return Response(
Expand Down
8 changes: 4 additions & 4 deletions server/tests/services/test_spark_app_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ def test_update_spark_app_config(self):
# Update spark app config
data = {
'spark.driver.memory': '2g',
'spark.driver.cores': '1',
'spark.driver.cores': 1,
'spark.executor.memory': '2g',
'spark.executor.cores': '2',
'spark.executor.instances': '2',
'spark.dynamicAllocation.enabled': 'true',
'spark.executor.cores': 2,
'spark.executor.instances': 2,
'spark.dynamicAllocation.enabled': True,
}

response_0 = SparkApp.update_spark_app_config_by_notebook_path(None, data=data)
Expand Down

0 comments on commit 1f8fd78

Please sign in to comment.