Ngone51 commented on a change in pull request #25670: [SPARK-28869][CORE] Roll 
over event log files
URL: https://github.com/apache/spark/pull/25670#discussion_r332594264
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
 ##########
 @@ -699,12 +689,15 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
       ((!appCompleted && fastInProgressParsing) || reparseChunkSize > 0)
 
     val bus = new ReplayListenerBus()
-    val listener = new AppListingListener(fileStatus, clock, shouldHalt)
+    val listener = new AppListingListener(reader, clock, shouldHalt)
     bus.addListener(listener)
 
     logInfo(s"Parsing $logPath for listing data...")
-    Utils.tryWithResource(EventLoggingListener.openEventLog(logPath, fs)) { in 
=>
-      bus.replay(in, logPath.toString, !appCompleted, eventsFilter)
+    val logFiles = reader.listEventLogFiles
+    logFiles.foreach { file =>
+      Utils.tryWithResource(EventLogFileReader.openEventLog(file.getPath, fs)) 
{ in =>
+        bus.replay(in, file.getPath.toString, !appCompleted, eventsFilter)
 
 Review comment:
   For `RollingEventLogFilesFileReader`, for example, if `AppListingListener` 
throws `HaltReplayException` while replaying file_1, it seems we'll still 
continue to replay for following files (e.g. file_2, file_3, ....), right ? We 
should avoid it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to