Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/19770#discussion_r154784102
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
@@ -616,23 +620,9 @@ private[history] class FsHistoryProvider(conf:
SparkConf, clock: Clock)
listing.write(newApp)
}
- toDelete.foreach { attempt =>
- val logPath = new Path(logDir, attempt.logPath)
- try {
- listing.delete(classOf[LogInfo], logPath.toString())
- } catch {
- case _: NoSuchElementException =>
- logDebug(s"Log info entry for $logPath not found.")
- }
- try {
- fs.delete(logPath, true)
- } catch {
- case e: AccessControlException =>
- logInfo(s"No permission to delete ${attempt.logPath},
ignoring.")
- case t: IOException =>
- logError(s"IOException in cleaning ${attempt.logPath}", t)
- }
- }
+ toDelete
+ .map(attempt => new Path(logDir, attempt.logPath))
--- End diff --
`.map { attempt =>`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]