在IDEA中调试spark程序会报错
18/05/16 07:33:51 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
18/05/16 07:33:51 ERROR SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: A master URL must be set in your configuration
at org.apache.spark.SparkContext.<init>(SparkContext.scala:401)
at LineAgeDemo$.main(LineAgeDemo.scala:12)
at LineAgeDemo.main(LineAgeDemo.scala)
18/05/16 07:33:52 INFO SparkContext: Successfully stopped SparkContext
Exception in thread "main" org.apache.spark.SparkException: A master URL must be set in your configuration
at org.apache.spark.SparkContext.<init>(SparkContext.scala:401)
at LineAgeDemo$.main(LineAgeDemo.scala:12)
at LineAgeDemo.main(LineAgeDemo.scala)
解决办法是在VM option中加入-Dspark.master=local