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

    https://github.com/apache/spark/pull/7097#discussion_r33537351
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -155,20 +149,20 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
                   HistoryServer.getAttemptURI(appId, attempt.attemptId), 
attempt.startTime)
                 // Do not call ui.bind() to avoid creating a new server for 
each application
               }
    -
               val appListener = new ApplicationEventListener()
               replayBus.addListener(appListener)
               val appInfo = replay(fs.getFileStatus(new Path(logDir, 
attempt.logPath)), replayBus)
    -
    -          ui.setAppName(s"${appInfo.name} ($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 they are 
properly picked up
    -          
ui.getSecurityManager.setAdminAcls(appListener.adminAcls.getOrElse(""))
    -          ui.getSecurityManager.setViewAcls(attempt.sparkUser,
    -            appListener.viewAcls.getOrElse(""))
    -          ui
    +          appInfo.map { info =>
    +            ui.setAppName(s"${info.name} ($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 they are 
properly picked up
    +            
ui.getSecurityManager.setAdminAcls(appListener.adminAcls.getOrElse(""))
    +            ui.getSecurityManager.setViewAcls(attempt.sparkUser,
    +              appListener.viewAcls.getOrElse(""))
    +            ui
    +          }.orNull
    --- End diff --
    
    If we return null here, is it possible that we have a `Some(null)` up there 
in L143? Should we return an option here instead and do `flatMap` up there?


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