Support Questions

Find answers, ask questions, and share your expertise

Error when executing the spark-shell

avatar
New Contributor

Hi,

 

Showing exception while executing spark-shell command

Kindly do help to resolve the issue

 

[data-5 bin]$ spark-shell

Exception in thread "main" java.lang.IllegalArgumentException: requirement failed: Provided Maven Coordinates must be in the form 'groupId:artifactId:version'. The coordinate provided is: org.apache.spark:spark-streaming-kafka-0-8-assembly_2.11-2.3.0

at scala.Predef$.require(Predef.scala:224)

at org.apache.spark.deploy.SparkSubmitUtils$$anonfun$extractMavenCoordinates$1.apply(SparkSubmit.scala:847)

at org.apache.spark.deploy.SparkSubmitUtils$$anonfun$extractMavenCoordinates$1.apply(SparkSubmit.scala:845)

at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)

at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)

at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)

at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)

at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)

at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)

at org.apache.spark.deploy.SparkSubmitUtils$.extractMavenCoordinates(SparkSubmit.scala:845)

at org.apache.spark.deploy.SparkSubmitUtils$.resolveMavenCoordinates(SparkSubmit.scala:1011)

at org.apache.spark.deploy.SparkSubmit$.prepareSubmitEnvironment(SparkSubmit.scala:294)

at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:158)

at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:124)

at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

1 REPLY 1

avatar
Master Collaborator

@Swasg  by any chance are you using the package name in the spark-shell? Something like 

spark-shell --packages org.apache.spark:spark-streaming-kafka-0-8-assembly_2.11-2.3.0

 

The error suggests that the format should be in the form of 'groupId:artifactId:version' but in your case it's 'groupId:artifactId-version'. If you are using the package in the command line or somewhere in your configuration, please modify it to:

org.apache.spark:spark-streaming-kafka-0-8-assembly_2.11:2.3.0