samra-h commented on code in PR #58965:
URL: https://github.com/apache/spark/pull/58965#discussion_r4525001563


##########
core/src/main/scala/org/apache/spark/status/AppHistoryServerPlugin.scala:
##########
@@ -36,8 +44,82 @@ private[spark] trait AppHistoryServerPlugin {
    */
   def setupUI(ui: SparkUI): Unit
 
+  /**
+   * Static resources (JS/CSS) to serve from the History Server's own UI, as 
(classpath resource
+   * directory, URL path) pairs. They are registered once at startup. The URL 
path must be under
+   * /static/; other paths are rejected so they cannot shadow the History 
Server's own routes.
+   * The directory is resolved with Spark's class loader, not the plugin's, so 
it must be on
+   * Spark's class path. Unlike a handler attached in [[setupUI]], which is 
torn down when the
+   * application cache evicts that application, these live as long as the 
History Server.
+   *
+   * This does not replace the registration in [[setupUI]] or in the tabs: the 
live driver UI
+   * never calls this hook, so tabs must still register their own handlers.
+   */
+  def staticResources: Seq[(String, String)] = Nil

Review Comment:
   Interesting suggestion. It would simplify the solution quite a bit while 
requiring only minimal code changes. I wasn't aware that we were allowed to 
move files around, so I hadn't considered that approach.
   
   I'd suggest keeping this PR as-is for now, and to open a second PR:
   
   **[SPARK-59613][CORE][SQL] Fix intermittent 404s on SparkSQL ExecutionPage - 
V2**
   
   In that PR, I'll implement the proposed changes and test the approach. If it 
behaves as expected, we can then decide which implementation we'd like to merge 
in the end.
   
   @dongjoon-hyun What are your thoughts on that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to