1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > Spark is not running in local mode therefore the checkpoint directory must not be on the local……

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

时间:2021-09-20 18:05:20

相关推荐

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

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 sparkCheckpointhdfs dfs -chmod 777 sparkCheckpointhdfs dfs -ls

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

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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。