刚用spark streaming,有几个关于checkpoint的疑问:
- checkpoint有两种,一种是对driver的meta的,一种是对data的。手册上说,只有用stateful transformation的时候,才会写data的checkpoint。那么,我如果没用stateful transformation,data的checkpoint数据还会写吗?如果不写,我重新restart的时候,丢失的rdd要从哪里获取?
- batch job里的checkpoint我是可以指定那个rdd写的,或者说是在哪一步写checkpoint。那么在streaming里,我需要用foreachRDD{rdd.checkpoint()}这种吗?
- 如果在spark streaming里我不显示写rdd.checkpoint(),那么spark是怎么决定哪个rdd要写data checkpoint的文件的?
你不写那就不会做checkpoint,rdd就会重新从原始数据计算得到
看看checkpont的实现
https://www.runexception.com/...