RDD中cache和persist的区别html
经过观察RDD.scala源代码便可知道cache和persist的区别:web
def persist(newLevel: StorageLevel): this.type = { sc.cleaner.foreach(_.registerRDDForCleanup(this)) /** Persist this RDD with the default storage level (`MEMORY_ONLY`). */
/** Persist this RDD with the default storage level (`MEMORY_ONLY`). */ |