Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/855#discussion_r15690254
  
    --- Diff: core/src/test/scala/org/apache/spark/ContextCleanerSuite.scala ---
    @@ -206,6 +206,33 @@ class ContextCleanerSuite extends 
ContextCleanerSuiteBase {
         postGCTester.assertCleanup()
       }
     
    +  test("automatically cleanup checkpoint data") {
    +    val conf=new 
SparkConf().setMaster("local[2]").setAppName("cleanupCheckpointData").
    +      set("spark.cleaner.checkpointData.enabled","true")
    +    sc =new SparkContext(conf)
    +    val checkpointDir = java.io.File.createTempFile("temp", "")
    +    checkpointDir.deleteOnExit()
    +    checkpointDir.delete()
    +    var rdd = newPairRDD
    +    sc.setCheckpointDir(checkpointDir.toString)
    +    rdd.checkpoint()
    +    rdd.cache()
    +    rdd.collect()
    +    val rddId = rdd.id
    +    RDDCheckpointData.rddCheckpointDataPath(sc, rddId).foreach { path =>
    --- End diff --
    
    nit: Would be cool if you add space between pre and post GC with a line of 
comments, like the other unit tests in this suite. To keep things consistent.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to