HeartSaVioR commented on a change in pull request #26416:
[WIP][SPARK-29779][CORE] Compact old event log files and cleanup
URL: https://github.com/apache/spark/pull/26416#discussion_r345519209
##########
File path:
core/src/main/scala/org/apache/spark/deploy/history/EventLogFileReaders.scala
##########
@@ -218,12 +219,24 @@ class RollingEventLogFilesFileReader(
private lazy val eventLogFiles: Seq[FileStatus] = {
val eventLogFiles = files.filter(isEventLogFile).sortBy { status =>
- getIndex(status.getPath.getName)
+ val filePath = status.getPath
+ var idx = getIndex(status.getPath.getName) + 0.0d
Review comment:
> filePath can be used here, right?
Yes, nice catch!
> BTW, why + 0.0d needed?
We need to make idx being double: we want to sort the files as index, but if
both original event log and compact log exist for same index, we add 0.1 to
compact log, and we take latest compact log and start from there.
----------------------------------------------------------------
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]