shuyouZZ commented on code in PR #38983:
URL: https://github.com/apache/spark/pull/38983#discussion_r1044044735
##########
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:
Thank you for review, @dongjoon-hyun
You're right, let me update.
--
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]