thejdeep commented on code in PR #38983:
URL: https://github.com/apache/spark/pull/38983#discussion_r1045380966
##########
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala:
##########
@@ -977,6 +977,20 @@ private[history] class FsHistoryProvider(conf: SparkConf,
clock: Clock)
listing.delete(classOf[LogInfo], log.logPath)
}
}
+ // 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)
Review Comment:
Since is this an additional `fs.listStatus` call, do you think this will be
expensive since we are making two list status calls - one in `checkForLogs` and
one in `cleanLogs` ? Is there any way to include this logic in `checkForLogs`
itself ?
--
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]