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

后端 未结 16 1971
爱一瞬间的悲伤
爱一瞬间的悲伤 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:57

    Where is the sparkContext object defined, is it inside the main function?

    I too faced the same problem, the mistake which i did was i initiated the sparkContext outside the main function and inside the class.

    When I initiated it inside the main function, it worked fine.

提交回复
热议问题