Spark - Error “A master URL must be set in your configuration” when submitting an app

后端 未结 16 1952
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 07:31

I have an Spark app which runs with no problem in local mode,but have some problems when submitting to the Spark cluster.

The error msg are as follows:



        
16条回答
  •  北海茫月
    2020-12-02 07:51

    just add .setMaster("local") to your code as shown below:

    val conf = new SparkConf().setAppName("Second").setMaster("local") 
    

    It worked for me ! Happy coding !

提交回复
热议问题