SparkException: Could not parse Master URL: 'yarn'

apache-spark

#1

Hi Team,

I am facing issues in spark-submit in yarn mode. I’m using below command:

[achary2303@gw02 ~]$ spark-submit --conf spark.ui.port=22222 --class NYSE_Excercise retail_2.10-0.1.jar NYSE yarn /public/nyse/ /user/achary2303/nyseOutput 5 Daily

I get below error:

18/02/11 00:23:33 ERROR SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Could not parse Master URL: 'yarn’
at org.apache.spark.SparkContext$.org$apache$spark$SparkContext$$createTaskScheduler(SparkContext.scala:2759)
at org.apache.spark.SparkContext.(SparkContext.scala:522)
at NYSE_Excercise$.main(NYSE_Excercise.scala:17)
at NYSE_Excercise.main(NYSE_Excercise.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Pwd: /home/achary2303.

Please let me know where I’m doing wront. Thanks.

Regards
Arun