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

    https://github.com/apache/spark/pull/4311#discussion_r25105076
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -166,21 +167,65 @@ private[history] class FsHistoryProvider(conf: 
SparkConf) extends ApplicationHis
                 newLastModifiedTime = math.max(newLastModifiedTime, modTime)
                 modTime > lastModifiedTime
               } else {
    -            false
    +            val appLogStatus = fs.listStatus(new 
Path(dir.getPath().toUri()))
    +            val appAttemptsDirs = if (appLogStatus != null) 
appLogStatus.filter(_.isDir).toSeq 
    +                                  else Seq[FileStatus]()
    +            var isValidApplicationLogToUpdate = false
    +            breakable {
    +                for (appAttemptDir <- appAttemptsDirs){
    +                    // There are multiple attempts inside this application 
logs
    +                    if (fs.isFile(new Path(appAttemptDir.getPath(),
    +                                           
EventLoggingListener.APPLICATION_COMPLETE))) {
    +                      val modTime = getModificationTime(dir)
    +                      newLastModifiedTime = math.max(newLastModifiedTime, 
modTime)
    +                      isValidApplicationLogToUpdate = modTime > 
lastModifiedTime
    +                      break
    +                    }
    +                }
    +            }
    +            isValidApplicationLogToUpdate
               }
    -        }
    -        .flatMap { dir =>
    -          try {
    -            val (replayBus, appListener) = createReplayBus(dir)
    -            replayBus.replay()
    -            Some(new FsApplicationHistoryInfo(
    -              dir.getPath().getName(),
    -              appListener.appId.getOrElse(dir.getPath().getName()),
    -              appListener.appName.getOrElse(NOT_STARTED),
    -              appListener.startTime.getOrElse(-1L),
    -              appListener.endTime.getOrElse(-1L),
    -              getModificationTime(dir),
    -              appListener.sparkUser.getOrElse(NOT_STARTED)))
    +         }
    +         .flatMap { dir =>
    +           val appAttemptsApplicationHistoryInfo = 
    +             new 
scala.collection.mutable.ArrayBuffer[FsApplicationHistoryInfo]()
    --- End diff --
    
    we should just import `scala.collection.mutable.ArrayBuffer` at the top


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