gengliangwang 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_r351026844
##########
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:
I think this is kind of ugly. How about just rename the
`HiveThriftServer2HistoryServerPlugin`, e.g.
`ThriftServer2HistoryServerPlugin`, so that we don't need to do such hard code
matching.
===============================================
Not sure if it works. Maybe it compares the full class name?
----------------------------------------------------------------
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]