HeartSaVioR commented on a change in pull request #26821:
[SPARK-20656][CORE]Support Incremental parsing of event logs in SHS
URL: https://github.com/apache/spark/pull/26821#discussion_r356995200
##########
File path:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -981,14 +1011,28 @@ private[history] class FsHistoryProvider(conf:
SparkConf, clock: Clock)
logFiles: Seq[FileStatus],
replayBus: ReplayListenerBus,
maybeTruncated: Boolean,
+ info: Option[IncrimentalMetaInfo] = None,
eventsFilter: ReplayEventsFilter = SELECT_ALL_FILTER): Unit = {
// stop replaying next log files if ReplayListenerBus indicates some error
or halt
var continueReplay = true
+ var lineToSkip = info.map(_.lineToSkip).getOrElse(-1)
+ val fileToStart = info.map(_.fileIndex).getOrElse(0)
+ var fileIndex = 0
Review comment:
`logFiles.drop(fileToStart).foreach` would be enough to filter out already
read files.
----------------------------------------------------------------
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]