Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch spark job jar from Nexus

Is it possible to get spark to fetch the primaryResource jar from Nexus given the maven coordinates for it? I know it is possible to fetch dependencies from Nexus, but it doesn't appear to be possible to fetch the job jar from Nexus. I'm wondering if anyone else has tried it or has a workaround for the same. Thanks.

like image 284
mottosan Avatar asked Apr 11 '16 15:04

mottosan


People also ask

Where do I put .jar files in Spark?

By default, Spark on YARN will use Spark jars installed locally, but the Spark jars can also be in a world-readable location on HDFS.

How do we add the jar file at client to SparkContext?

Adding jars to your applicationUse –jars or SparkContext. addJar to add jar to your application. Note that this option will make the jars available on the nodes in the cluster but the jars will not be added to the classpath.

What is jar file in Spark submit?

Spark JAR files let you package a project into a single file so it can be run on a Spark cluster. A lot of developers develop Spark code in brower based notebooks because they're unfamiliar with JAR files.


1 Answers

Looks like spark-submit works with just --packages and --repositories and a dummy primaryResource.

The example:

--packages someGroupId:someArtifactId:someVersion \
--repositories http://nexus.company.com/nexus nonExistentFakeName.jar
like image 68
mottosan Avatar answered Nov 15 '22 11:11

mottosan