shahidki31 commented on a change in pull request #26378: 
[SPARK-29724][SPARK-29726][WEBUI][SQL] Support JDBC/ODBC tab for HistoryServer 
WebUI
URL: https://github.com/apache/spark/pull/26378#discussion_r351016979
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
 ##########
 @@ -352,17 +352,36 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
     val ui = SparkUI.create(None, new HistoryAppStatusStore(conf, kvstore), 
conf, secManager,
       app.info.name, HistoryServer.getAttemptURI(appId, 
attempt.info.attemptId),
       attempt.info.startTime.getTime(), attempt.info.appSparkVersion)
-    loadPlugins().foreach(_.setupUI(ui))
-
+    setupPluginUI(ui)
     val loadedUI = LoadedAppUI(ui)
-
     synchronized {
       activeUIs((appId, attemptId)) = loadedUI
     }
 
     Some(loadedUI)
   }
 
+  private def setupPluginUI(ui: SparkUI): Unit = {
+    val plugins = loadPlugins().toSeq
+
+    var sqlTab: Option[AppHistoryServerPlugin] = None
+    var jdbcTab: Option[AppHistoryServerPlugin] = None
+    val otherTabs: Seq[AppHistoryServerPlugin] = Seq()
+
+    plugins.foreach{ plugin =>
+      if (plugin.toString.contains("SQLHistoryServerPlugin")) {
 
 Review comment:
   Thanks @gengliangwang ,By default, JDBC/ODBC tab comes first then SQL tab 
which is different from live UI. To make sure SQL tab comes first I created the 
method.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to