Re: Why spark-submit works with package not with jar

2020-10-21 Thread Wim Van Leuven
We actually zipped the full conda environments during our build and ship those On Wed, 21 Oct 2020 at 20:25, Mich Talebzadeh wrote: > How about PySpark? What process can that go through to not depend on > external repo access in production > > > LinkedIn * >

Re: Why spark-submit works with package not with jar

2020-10-21 Thread Mich Talebzadeh
How about PySpark? What process can that go through to not depend on external repo access in production LinkedIn * https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw *

Re: Why spark-submit works with package not with jar

2020-10-21 Thread Sean Owen
Yes, it's reasonable to build an uber-jar in development, using Maven/Ivy to resolve dependencies (and of course excluding 'provided' dependencies like Spark), and push that to production. That gives you a static artifact to run that does not depend on external repo access in production. On Wed,

Re: Why spark-submit works with package not with jar

2020-10-21 Thread Wim Van Leuven
I like an artefact repo as the proper solution. Problem with environments that haven't yet fully embraced devops: artefact repos are considered development tools and are often not yet used to promote packages to production, air gapped if necessary. -wim On Wed, 21 Oct 2020 at 19:00, Mich

Re: Why spark-submit works with package not with jar

2020-10-21 Thread Mich Talebzadeh
Hi Wim, This is an issue DEV/OPS face all the time. Cannot access the internet behind the company firewall. There is Nexus for this that manages dependencies with usual load times in seconds. However, only authorised accounts can request it through

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Wim Van Leuven
Sean, Problem with the -packages is that in enterprise settings security might not allow the data environment to link to the internet or even the internal proxying artefect repository. Also, wasn't uberjars an antipattern? For some reason I don't like them... Kind regards -wim On Wed, 21 Oct

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Mich Talebzadeh
Thanks again all. Anyway as Nicola suggested I used the trench war approach to sort this out by just using jars and working out their dependencies in ~/.ivy2/jars directory using grep -lRi :) This now works with just using jars (new added ones in grey) after resolving the dependencies

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Sean Owen
Rather, let --packages (via Ivy) worry about them, because they tell Ivy what they need. There's no 100% guarantee that conflicting dependencies are resolved in a way that works in every single case, which you run into sometimes when using incompatible libraries, but yes this is the point of

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Mich Talebzadeh
or just use mvn or sbt to create an Uber jar file. LinkedIn * https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw * *Disclaimer:* Use it at your own risk. Any and all

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Mich Talebzadeh
Thanks again all. Hi Sean, As I understood from your statement, you are suggesting just use --packages without worrying about individual jar dependencies? LinkedIn * https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Sean Owen
>From the looks of it, it's the com.google.http-client ones. But there may be more. You should not have to reason about this. That's why you let Maven / Ivy resolution figure it out. It is not true that everything in .ivy2 is on the classpath. On Tue, Oct 20, 2020 at 3:48 PM Mich Talebzadeh

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Nicolas Paris
you can proceed step by step. > java.lang.NoClassDefFoundError: > com/google/api/client/http/HttpRequestInitializer I would run `grep -lRi HttpRequestInitializer` in the ivy2 folder to spot the jar containing that class. after several other class not found you should succeed Mich Talebzadeh

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Mich Talebzadeh
Hi Nicolas, I removed ~/.iv2 and reran the spark job with the package included (the one working) Under ~/.ivy/jars I Have 37 jar files, including the one that I had before. /home/hduser/.ivy2/jars> ls com.databricks_spark-avro_2.11-4.0.0.jar

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Nicolas Paris
once you got the jars from --package in the ~/.ivy2 folder you can then add the list to --jars . in this way there is no missing dependency. ayan guha writes: > Hi > > One way to think of this is --packages is better when you have third party > dependency and --jars is better when you have

Re: Why spark-submit works with package not with jar

2020-10-20 Thread ayan guha
Hi One way to think of this is --packages is better when you have third party dependency and --jars is better when you have custom in-house built jars. On Wed, 21 Oct 2020 at 3:44 am, Mich Talebzadeh wrote: > Thanks Sean and Russell. Much appreciated. > > Just to clarify recently I had issues

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Mich Talebzadeh
Thanks Sean and Russell. Much appreciated. Just to clarify recently I had issues with different versions of Google Guava jar files in building Uber jar file (to evict the unwanted ones). These used to work a year and half ago using Google Dataproc compute engines (comes with Spark preloaded) and

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Sean Owen
Probably because your JAR file requires other JARs which you didn't supply. If you specify a package, it reads metadata like a pom.xml file to understand what other dependent JARs also need to be loaded. On Tue, Oct 20, 2020 at 10:50 AM Mich Talebzadeh wrote: > Hi, > > I have a scenario that I

Re: Why spark-submit works with package not with jar

2020-10-20 Thread Russell Spitzer
--jar Adds only that jar --package adds the Jar and a it's dependencies listed in maven On Tue, Oct 20, 2020 at 10:50 AM Mich Talebzadeh wrote: > Hi, > > I have a scenario that I use in Spark submit as follows: > > spark-submit --driver-class-path /home/hduser/jars/ddhybrid.jar --jars >

Why spark-submit works with package not with jar

2020-10-20 Thread Mich Talebzadeh
Hi, I have a scenario that I use in Spark submit as follows: spark-submit --driver-class-path /home/hduser/jars/ddhybrid.jar --jars /home/hduser/jars/spark-bigquery-latest.jar,/home/hduser/jars/ddhybrid.jar, */home/hduser/jars/spark-bigquery_2.11-0.2.6.jar* As you can see the jar files needed