Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1218#discussion_r16210236
  
    --- 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 --
    
    This comment is not mine. It's just been moved around because of changes 
around it.


---
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]

Reply via email to