You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/11 12:03:51 UTC

[GitHub] [spark] Ngone51 commented on a change in pull request #31742: [SPARK-33000] Cleanup checkpoint data on shutdown

Ngone51 commented on a change in pull request #31742:
URL: https://github.com/apache/spark/pull/31742#discussion_r592304336



##########
File path: core/src/main/scala/org/apache/spark/ContextCleaner.scala
##########
@@ -207,6 +207,29 @@ private[spark] class ContextCleaner(
     }
   }
 
+  /**
+   * Cleanup resources on shutdown.
+   *
+   * This is important for resources that don't live in memory, like checkpoint data,
+   * that outlive the Spark process. The normal cleanup thread in [[keepCleaning]]
+   * doesn't cleanup things on shutdown because it's interrupted by the shutdown
+   * process itself.
+   */
+  private def cleanupOnShutdown(): Unit = {
+    referenceBuffer.toArray(Array[CleanupTaskWeakReference]())
+    .foreach { ref =>
+      ref.task match {
+        case CleanCheckpoint(rddId) =>

Review comment:
       Shuffle files are handled by `DiskBlockManager`.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org