Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spark-submit Error: No main class set in JAR; please specify one with --class

Tags:

apache-spark

I am trying to execute a spark application using spark-submit.

c:\temp>spark-submit --master yarn  ./SparkExamples.jar --class com.examples.WordCount
Error: No main class set in JAR; please specify one with --class
Run with --help for usage help or --verbose for debug output

The main class file is existing in the jar file. I also checked there is a MANIFEST.MF file which holds the main class name.

Manifest-Version: 1.0

Main-Class: com.examples.WordCount

what am I missing?

like image 534
Kannan Avatar asked Sep 15 '17 23:09

Kannan


1 Answers

Try providing --class parameter first before ./SparkExamples.jar

spark-submit --master yarn  --class com.examples.WordCount ./SparkExamples.jar
like image 158
hd16 Avatar answered Oct 02 '22 15:10

hd16