/**
* Changes the dependencies of this RDD from its original parents to a new RDD (`newRDD`)
* created from the checkpoint file, and forget its old dependencies and partitions.
*/
private[spark] def markCheckpointed(checkpointRDD: RDD[_]) {
clearDependencies()
partitions_ = null
deps = null // Forget the constructor argument for dependencies too
}
在我们的应用程序中,在使用checkpoint的时候只需要进行两步简单的操作即可,使用SparkContext设置一个checkPoint文件目录,在需要checkpoint的RDD中调用doCheckpoint方法即可。
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx