-
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.
* Enhance notebook loading process with Spark integration - Added SparkModel import to App.js for improved Spark session handling. - Refactored handleExistingNotebookClick to use async/await for fetching notebook data and Spark application details concurrently. - Implemented error handling for fetching notebook and Spark app, ensuring better user feedback and session management. - Introduced a new method in SparkModel.js to retrieve Spark app details by notebook path, enhancing integration with the backend API. * Enhance App.js with notebook reference and improved Spark app ID handling - Added useRef for notebook reference to facilitate direct interaction with the Notebook component. - Updated Spark app ID handling to ensure it is set correctly when an active Spark application is detected. - Minor refactoring for improved clarity and maintainability of the code. * Enhance App.js with additional logging for notebook and Spark app integration - Added console log to display the associated Spark application after fetching notebook data. - Improved visibility into the notebook and Spark app interaction for better debugging and user feedback. * Refactor Notebook component to support forward refs and expose Spark app ID setter - Updated Notebook.js to use forwardRef, allowing parent components to directly interact with the Notebook's internal state. - Implemented useImperativeHandle to expose a method for setting the Spark app ID, enhancing integration with parent components. - Improved code clarity and maintainability by restructuring the component's function signature. * Enhance logging in App.js and Notebook.js for improved debugging - Added useEffect in App.js to log the current notebook reference, aiding in tracking its state. - Implemented useEffect in Notebook.js to log changes to sparkAppId, enhancing visibility into Spark application interactions. - Updated setSparkAppId method in Notebook.js to include logging when setting the Spark app ID, improving traceability during state changes. * Refactor Notebook.js to enhance Spark app ID handling and session management - Updated the Notebook component to reset sparkAppId when switching notebooks and immediately fetch the associated Spark app. - Improved error handling during the Spark app fetch process, logging any failures for better debugging. - Streamlined the useEffect hook to ensure proper state management and clarity in the notebook's functionality. * Update demo notebook to modify execution state and add Spark session termination cell - Changed the execution state of an existing code cell from true to false, indicating it was not executed. - Added a new code cell to the demo notebook for stopping the Spark session, including execution metadata and success status. - Enhanced the notebook structure for better clarity and usability in Spark session management.
- Loading branch information
1 parent
3b2dca7
commit 3d346d0
Showing
4 changed files
with
104 additions
and
23 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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
}, | ||
{ | ||
"cell_type": "code", | ||
"isExecuted": true, | ||
"isExecuted": false, | ||
"lastExecutionResult": "success", | ||
"lastExecutionTime": "2024-12-10 10:26:03", | ||
"metadata": {}, | ||
|
@@ -43,6 +43,18 @@ | |
"spark = create_spark(\"work/[email protected]/demo.ipynb\")\n", | ||
"spark" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"isExecuted": true, | ||
"lastExecutionResult": "success", | ||
"lastExecutionTime": "2024-12-10 12:27:14", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"spark.stop()" | ||
] | ||
} | ||
], | ||
"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
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