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

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

    Worked for me after replacing

    SparkConf sparkConf = new SparkConf().setAppName("SOME APP NAME");
    

    with

    SparkConf sparkConf = new SparkConf().setAppName("SOME APP NAME").setMaster("local[2]").set("spark.executor.memory","1g");
    

    Found this solution on some other thread on stackoverflow.

提交回复
热议问题