Skip to content

Commit

Permalink
add warning message for unpersist after local checkpointing
Browse files Browse the repository at this point in the history
  • Loading branch information
mingkangli-db committed Jul 17, 2024
1 parent 5d16c31 commit 9c993f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/main/scala/org/apache/spark/rdd/RDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ abstract class RDD[T: ClassTag](
* @return This RDD.
*/
def unpersist(blocking: Boolean = false): this.type = {
if (isLocallyCheckpointed) {
// This means its lineage has been truncated and cannot be recomputed once unpersisted.
logWarning(log"RDD ${MDC(RDD_ID, id)} was locally checkpointed, its lineage has been" +
log" truncated and cannot be recomputed after unpersisting")
}
logInfo(log"Removing RDD ${MDC(RDD_ID, id)} from persistence list")
sc.unpersistRDD(id, blocking)
storageLevel = StorageLevel.NONE
Expand Down

0 comments on commit 9c993f5

Please sign in to comment.