zhengruifeng opened a new pull request #24870: [SPARK-27018][Core] Fix 
incorrect removal of checkpointed file in PeriodicCheckpointer
URL: https://github.com/apache/spark/pull/24870
 
 
   ## What changes were proposed in this pull request?
   remove the oldest checkpointed file only if next checkpoint exists.
   I think this patch needs back-porting.
   
   ## How was this patch tested?
   existing test
   
   local check in spark-shell with following suite:
   ```
   import org.apache.spark.ml.linalg.Vectors
   import org.apache.spark.ml.classification.GBTClassifier
   
   case class Row(features: org.apache.spark.ml.linalg.Vector, label: Int)
   
   sc.setCheckpointDir("/checkpoints")
   val trainingData = sc.parallelize(1 to 2426874, 256).map(x => 
Row(Vectors.dense(x, x + 1, x * 2 % 10), if (x % 5 == 0) 1 else 0)).toDF
   val classifier = new GBTClassifier()
     .setLabelCol("label")
     .setFeaturesCol("features")
     .setProbabilityCol("probability")
     .setMaxIter(100)
     .setMaxDepth(10)
     .setCheckpointInterval(2)
   
   classifier.fit(trainingData)
   ```
   
   
   

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


With regards,
Apache Git Services

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

Reply via email to