Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/1218#discussion_r16203570
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
@@ -91,15 +98,36 @@ private[history] class FsHistoryProvider(conf:
SparkConf) extends ApplicationHis
logCheckingThread.start()
}
- override def getListing() = appList
+ override def getListing() = appList.values
- override def getAppUI(appId: String): SparkUI = {
+ override def getAppUI(appId: String): Option[SparkUI] = {
try {
- val appLogDir = fs.getFileStatus(new Path(resolvedLogDir.toString,
appId))
- val (_, ui) = loadAppInfo(appLogDir, renderUI = true)
- ui
+ appList.get(appId).map(info => {
+ val (replayBus, appListener) = createReplayBus(fs.getFileStatus(
+ new Path(logDir, info.logDir)))
+ val ui = {
+ val conf = this.conf.clone()
+ val appSecManager = new SecurityManager(conf)
+ new SparkUI(conf, appSecManager, replayBus, appId,
+ s"${HistoryServer.UI_PATH_PREFIX}/$appId")
+ // Do not call ui.bind() to avoid creating a new server for each
application
+ }
+
+ replayBus.replay()
+
+ // Note that this does not have any effect due to SPARK-2169.
+ ui.setAppName(s"${appListener.appName.getOrElse(NOT_STARTED)}
($appId)")
+
+ val uiAclsEnabled =
conf.getBoolean("spark.history.ui.acls.enable", false)
+ ui.getSecurityManager.setAcls(uiAclsEnabled)
+ // make sure to set admin acls before view acls so properly picked
up
--- End diff --
"before view acls so *they get* properly picked up"? (which ACL are you
referring to, by the way?)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]