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

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

    var appName:String ="test"
    val conf = new SparkConf().setAppName(appName).setMaster("local[*]").set("spark.executor.memory","1g");
    val sc =  SparkContext.getOrCreate(conf)
    sc.setLogLevel("WARN")
    

提交回复
热议问题