0
点赞
收藏
分享

微信扫一扫

Spark is not running in local mode, therefore the checkpoint directory must not be on the local……

何晓杰Dev 2022-02-13 阅读 83


Spark执行的时候报错:

WARN spark.SparkContext: Spark is not running in local mode, therefore the checkpoint directory must not be on the local filesystem. Directory 'file:///home/checkpointData' appears to be on the local filesystem.

简单翻译下:Spark没有在本地模式下运行,因此检查点目录不能在本地文件系统上。

也就是说,Spark应用跑在集群模式下,checkpoint directory是不可以设置在本地文件系统的。

在HDFS上创建一个目录:

hdfs dfs -mkdir sparkCheckpoint
hdfs dfs -chmod 777 sparkCheckpoint
hdfs dfs -ls

然后在spark里面配置一下就可以了。

sc.setCheckpointDir("hdfs://ns1/tmp/username/sparkCheckpoint")



举报

相关推荐

0 条评论