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

    https://github.com/apache/spark/pull/18887#discussion_r141123050
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -243,42 +282,38 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
     
       override def getAppUI(appId: String, attemptId: Option[String]): 
Option[LoadedAppUI] = {
         try {
    -      applications.get(appId).flatMap { appInfo =>
    -        appInfo.attempts.find(_.attemptId == attemptId).flatMap { attempt 
=>
    +      val appInfo = load(appId)
    +      appInfo.attempts
    +        .find { attempt => attempt.info.attemptId == attemptId }
    +        .map { attempt =>
               val replayBus = new ReplayListenerBus()
               val ui = {
                 val conf = this.conf.clone()
                 val appSecManager = new SecurityManager(conf)
    -            SparkUI.createHistoryUI(conf, replayBus, appSecManager, 
appInfo.name,
    -              HistoryServer.getAttemptURI(appId, attempt.attemptId),
    -              Some(attempt.lastUpdated), attempt.startTime)
    +            SparkUI.createHistoryUI(conf, replayBus, appSecManager, 
appInfo.info.name,
    +              HistoryServer.getAttemptURI(appId, attempt.info.attemptId),
    +              Some(attempt.info.lastUpdated.getTime()), 
attempt.info.startTime.getTime())
    --- End diff --
    
    `AttemptInfoWrapper` stores information that is not available in the public 
API and is used by the provider. Later changes also add more fields to 
`ApplicationInfoWrapper` that are needed by the provider.


---

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

Reply via email to