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……
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Spark執(zhí)行的時候報錯:
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沒有在本地模式下運行,因此檢查點目錄不能在本地文件系統(tǒng)上。
也就是說,Spark應(yīng)用跑在集群模式下,checkpoint directory是不可以設(shè)置在本地文件系統(tǒng)的。
在HDFS上創(chuàng)建一個目錄:
hdfs dfs -mkdir sparkCheckpoint hdfs dfs -chmod 777 sparkCheckpoint hdfs dfs -ls然后在spark里面配置一下就可以了。
sc.setCheckpointDir("hdfs://ns1/tmp/username/sparkCheckpoint")總結(jié)
以上是生活随笔為你收集整理的Spark is not running in local mode, therefore the checkpoint directory must not be on the local……的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LeetCode 421. 数组中两个数
- 下一篇: from __future__ impo