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`). */ |