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

    https://github.com/apache/spark/pull/5886#discussion_r29663820
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -186,13 +186,13 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
         try {
           val statusList = Option(fs.listStatus(new Path(logDir))).map(_.toSeq)
             .getOrElse(Seq[FileStatus]())
    -      var newLastModifiedTime = lastModifiedTime
           val logInfos: Seq[FileStatus] = statusList
             .filter { entry =>
               try {
                 getModificationTime(entry).map { time =>
    -              newLastModifiedTime = math.max(newLastModifiedTime, time)
    -              time >= lastModifiedTime
    +              val fileName = entry.getPath.getName
    +              val oldLastModifiedTime = 
lastModifiedTimes.getOrElse(fileName, -1L)
    +              time > oldLastModifiedTime
    --- End diff --
    
    If the app is in process, it doesn't matter if we don't reprocess the log 
file. After the app completed, its' file name will change, and it will get the 
`oldLastModifiedTime = -1', so `time > oldLastModifiedTime` will be `true`, and 
the log file will reprocess.


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