step1、进入spark-shell

 

step2、scala> sc.setCheckpointDir("hdfs://bigdata121:9000/sparkckpt1004")

设置完成后会生成,检查点目录

Spark RDD 的检查点--一种容错机制

step3、设置RDD的checkpoint

scala> rdd.checkpoint
<console>:24: error: not found: value rdd
       rdd.checkpoint
       ^

scala> rdd1.checkpoint

step4: 再次统计行数

scala> rdd1.count
res16: Long = 45
 

相关文章:

  • 2022-12-23
  • 2021-06-21
  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-07-21
  • 2021-05-27
猜你喜欢
  • 2021-10-24
  • 2022-01-20
  • 2021-04-20
  • 2021-07-19
  • 2021-10-15
相关资源
相似解决方案