RDD.
unpersist
Mark the RDD as non-persistent, and remove all blocks for it from memory and disk.
New in version 0.9.1.
whether to block until all blocks are deleted
New in version 3.0.0.
RDD
The same RDD
See also
RDD.cache()
RDD.persist()
RDD.getStorageLevel()
Examples
>>> rdd = sc.range(5) >>> rdd.is_cached False >>> _ = rdd.unpersist() >>> rdd.is_cached False >>> _ = rdd.cache() >>> rdd.is_cached True >>> _ = rdd.unpersist() >>> rdd.is_cached False >>> _ = rdd.unpersist()