@@ -406,12 +406,14 @@ class CleanerTester(
406406 sc : SparkContext ,
407407 rddIds : Seq [Int ] = Seq .empty,
408408 shuffleIds : Seq [Int ] = Seq .empty,
409- broadcastIds : Seq [Long ] = Seq .empty)
409+ broadcastIds : Seq [Long ] = Seq .empty,
410+ checkpointIds : Seq [Long ] = Seq .empty)
410411 extends Logging {
411412
412413 val toBeCleanedRDDIds = new HashSet [Int ] with SynchronizedSet [Int ] ++= rddIds
413414 val toBeCleanedShuffleIds = new HashSet [Int ] with SynchronizedSet [Int ] ++= shuffleIds
414415 val toBeCleanedBroadcstIds = new HashSet [Long ] with SynchronizedSet [Long ] ++= broadcastIds
416+ val toBeCheckpointIds = new HashSet [Long ] with SynchronizedSet [Long ] ++= checkpointIds
415417 val isDistributed = ! sc.isLocal
416418
417419 val cleanerListener = new CleanerListener {
@@ -433,6 +435,11 @@ class CleanerTester(
433435 def accumCleaned (accId : Long ): Unit = {
434436 logInfo(" Cleaned accId " + accId + " cleaned" )
435437 }
438+
439+ def checkpointCleaned (rddId : Long ): Unit = {
440+ toBeCheckpointIds -= rddId
441+ logInfo(" checkpoint rddId " + rddId + " cleaned" )
442+ }
436443 }
437444
438445 val MAX_VALIDATION_ATTEMPTS = 10
@@ -547,7 +554,8 @@ class CleanerTester(
547554 private def isAllCleanedUp =
548555 toBeCleanedRDDIds.isEmpty &&
549556 toBeCleanedShuffleIds.isEmpty &&
550- toBeCleanedBroadcstIds.isEmpty
557+ toBeCleanedBroadcstIds.isEmpty &&
558+ toBeCheckpointIds.isEmpty
551559
552560 private def getRDDBlocks (rddId : Int ): Seq [BlockId ] = {
553561 blockManager.master.getMatchingBlockIds( _ match {
0 commit comments