Skip to content

Commit 964aea7

Browse files
committed
review commits
1 parent b08b3c9 commit 964aea7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

core/src/test/scala/org/apache/spark/ContextCleanerSuite.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class ContextCleanerSuite extends ContextCleanerSuiteBase {
224224
assert(fs.exists(path))
225225

226226
// the checkpoint is not cleaned by default (without the configuration set)
227-
var postGCTester = new CleanerTester(sc, Seq(rddId), Nil, Nil)
227+
var postGCTester = new CleanerTester(sc, Seq(rddId), Nil, Nil, Nil)
228228
rdd = null // Make RDD out of scope
229229
runGC()
230230
postGCTester.assertCleanup()
@@ -245,7 +245,7 @@ class ContextCleanerSuite extends ContextCleanerSuiteBase {
245245
assert(fs.exists(RDDCheckpointData.rddCheckpointDataPath(sc, rddId).get))
246246

247247
// Test that GC causes checkpoint data cleanup after dereferencing the RDD
248-
postGCTester = new CleanerTester(sc, Seq(rddId), Nil, Nil)
248+
postGCTester = new CleanerTester(sc, Seq(rddId), Nil, Nil, Seq(rddId))
249249
rdd = null // Make RDD out of scope
250250
runGC()
251251
postGCTester.assertCleanup()
@@ -429,7 +429,7 @@ class CleanerTester(
429429

430430
def broadcastCleaned(broadcastId: Long): Unit = {
431431
toBeCleanedBroadcstIds -= broadcastId
432-
logInfo("Broadcast" + broadcastId + " cleaned")
432+
logInfo("Broadcast " + broadcastId + " cleaned")
433433
}
434434

435435
def accumCleaned(accId: Long): Unit = {
@@ -438,7 +438,7 @@ class CleanerTester(
438438

439439
def checkpointCleaned(rddId: Long): Unit = {
440440
toBeCheckpointIds -= rddId
441-
logInfo("checkpoint rddId " + rddId + " cleaned")
441+
logInfo("checkpoint " + rddId + " cleaned")
442442
}
443443
}
444444

@@ -463,7 +463,8 @@ class CleanerTester(
463463

464464
/** Verify that RDDs, shuffles, etc. occupy resources */
465465
private def preCleanupValidate() {
466-
assert(rddIds.nonEmpty || shuffleIds.nonEmpty || broadcastIds.nonEmpty, "Nothing to cleanup")
466+
assert(rddIds.nonEmpty || shuffleIds.nonEmpty || broadcastIds.nonEmpty ||
467+
checkpointIds.nonEmpty, "Nothing to cleanup")
467468

468469
// Verify the RDDs have been persisted and blocks are present
469470
rddIds.foreach { rddId =>

0 commit comments

Comments
 (0)