dongjoon-hyun commented on code in PR #38983:
URL: https://github.com/apache/spark/pull/38983#discussion_r1043761419
##########
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala:
##########
@@ -996,6 +996,21 @@ private[history] class FsHistoryProvider(conf: SparkConf,
clock: Clock)
}
}
+ // Delete log files that don't exist in listing database and exceed the
configured max age.
+ Option(fs.listStatus(new Path(logDir))).map(_.toSeq).getOrElse(Nil)
+ .flatMap { entry => EventLogFileReader(fs, entry) }
+ .foreach { reader =>
+ try {
+ listing.read(classOf[LogInfo], reader.rootPath.toString)
+ } catch {
+ case _: NoSuchElementException =>
+ if (reader.modificationTime < maxTime) {
Review Comment:
If this is a `time-based` deletion for unlisted logs, why don't we have at
line 980?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]