로컬 모드에서 문제없이 실행되는 Spark 앱이 있지만 Spark 클러스터에 제출할 때 몇 가지 문제가 있습니다.
오류 메시지는 다음과 같습니다.
16/06/24 15:42:06 WARN scheduler.TaskSetManager: Lost task 2.0 in stage 0.0 (TID 2, cluster-node-02): java.lang.ExceptionInInitializerError
at GroupEvolutionES$$anonfun$6.apply(GroupEvolutionES.scala:579)
at GroupEvolutionES$$anonfun$6.apply(GroupEvolutionES.scala:579)
at scala.collection.Iterator$$anon$14.hasNext(Iterator.scala:390)
at org.apache.spark.util.Utils$.getIteratorSize(Utils.scala:1595)
at org.apache.spark.rdd.RDD$$anonfun$count$1.apply(RDD.scala:1157)
at org.apache.spark.rdd.RDD$$anonfun$count$1.apply(RDD.scala:1157)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
at org.apache.spark.scheduler.Task.run(Task.scala:89)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.spark.SparkException: A master URL must be set in your configuration
at org.apache.spark.SparkContext.<init>(SparkContext.scala:401)
at GroupEvolutionES$.<init>(GroupEvolutionES.scala:37)
at GroupEvolutionES$.<clinit>(GroupEvolutionES.scala)
... 14 more
16/06/24 15:42:06 WARN scheduler.TaskSetManager: Lost task 5.0 in stage 0.0 (TID 5, cluster-node-02): java.lang.NoClassDefFoundError: Could not initialize class GroupEvolutionES$
at GroupEvolutionES$$anonfun$6.apply(GroupEvolutionES.scala:579)
at GroupEvolutionES$$anonfun$6.apply(GroupEvolutionES.scala:579)
at scala.collection.Iterator$$anon$14.hasNext(Iterator.scala:390)
at org.apache.spark.util.Utils$.getIteratorSize(Utils.scala:1595)
at org.apache.spark.rdd.RDD$$anonfun$count$1.apply(RDD.scala:1157)
at org.apache.spark.rdd.RDD$$anonfun$count$1.apply(RDD.scala:1157)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1858)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
at org.apache.spark.scheduler.Task.run(Task.scala:89)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
위의 코드에서는 GroupEvolutionES
메인 클래스입니다. 오류 메시지는 "구성에 마스터 URL을 설정해야합니다"라고 표시되지만 "--master"매개 변수를에 제공했습니다 spark-submit
.
이 문제를 해결하는 방법을 아는 사람이 있습니까?
Spark 버전 : 1.6.1