解決在local模式中提交spark作業至Apache Livy Batch交互模式錯誤

問題詳情:

在使用Apache Livy中Batch模式提交Spark作業時,提交json如下:

{
	"conf":{"spark.master":"local"},
	"file":"/home/hadoop/Documents/spark/my_jars/SparkPlatform.jar",
	"className":"com.application.SparkOperateKv"
}

其中file對應的是位於spark服務機器上的jar包。

這時候會出現如下異常

{"msg":"requirement failed: Local path /home/hadoop/Documents/spark/my_jars/SparkPlatform.jar cannot be added to user sessions."}

解決方法是在jar包路徑前添加 local:/

{
	"conf":{"spark.master":"local"},
	"file":"local:/home/hadoop/Documents/spark/my_jars/SparkPlatform.jar",
	"className":"com.application.SparkOperateKv"
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章