Idea对Spark程序调试

Idea对Spark程序本地调试

var conf = new SparkConf().setAppName("WordCount").setMaster("local")
var sc = new SparkContext(conf)
...
...
...
sc.stop()

设置成local即可进行本地调试
Idea对Spark程序集群调试

var conf = new SparkConf().setAppName("WordCount")
      .setMaster("spark://node05:7077")
      .setJars(List("D:\\code\\streming\\target\\WordCount.jar"))
var sc = new SparkContext(conf)
...
...
...
sc.stop()

你可能感兴趣的:(spark)