A master URL must be set in your configuration at org.apache.spark.SparkContext.<init>(SparkContext.

  在IDEA中运行Spark程序时报了这个错,A master URL must be set in your configuration at org.apache.spark.SparkContext.<init>(SparkContext.

  解决方式:

进入:Run > Edit Configurations... > Application > "My project name" > Configuraton,

设置VM options项为-Dspark.master=local

-Dspark.master=local:表示设置我的spark程序以local模式运行.

 

参考文章:https://blog.csdn.net/caiandyong/article/details/51736980

原文地址:https://www.cnblogs.com/xhj1074376195/p/14254423.html