-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor demo notebook and SparkModel.js for improved Spark session h…
…andling - Removed outdated code cells from the demo notebook to enhance clarity and usability. - Updated SparkModel.js to improve validation of Spark application IDs, ensuring they start with 'app-' and are correctly extracted from the HTML. - Simplified the logic for storing Spark session information in the Notebook component, enhancing overall session management.
- Loading branch information
1 parent
9e345e6
commit 5d1bfce
Showing
3 changed files
with
24 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,39 +10,6 @@ | |
"- This is just a demo notebook\n", | ||
"- For testing only" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"isExecuted": true, | ||
"lastExecutionResult": "success", | ||
"lastExecutionTime": "2024-12-10 08:03:15", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"\n", | ||
" <div style=\"border: 1px solid #e8e8e8; padding: 10px;\">\n", | ||
" <h3>Spark Session Information</h3>\n", | ||
" <p><strong>Config:</strong> {'spark.driver.memory': '1g', 'spark.driver.cores': 1, 'spark.executor.memory': '1g', 'spark.executor.cores': 1, 'spark.executor.instances': 1, 'spark.dynamicAllocation.enabled': False}</p>\n", | ||
" <p><strong>Application ID:</strong> app-20241210080310-0003</p>\n", | ||
" <p><strong>Spark UI:</strong> <a href=\"http://localhost:18080/history/app-20241210080310-0003\">http://localhost:18080/history/app-20241210080310-0003</a></p>\n", | ||
" </div>\n", | ||
" " | ||
], | ||
"text/plain": [ | ||
"Custom Spark Session (App ID: app-20241210080310-0003) - UI: http://0edb0a63b2fb:4040" | ||
] | ||
}, | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"spark = create_spark(\"work/[email protected]/demo.ipynb\")\n", | ||
"spark" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters