-
Notifications
You must be signed in to change notification settings - Fork 114
Fix/Improve Dependency loader #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add api that support exclusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be it would be cleaner to
static import scala.collection.JavaConversions.*
...
dep.load(artifaict, asJavaCollection(excludes), true, false);|
Great improvement! Does it now have both, a Java and Scala API? |
|
@bzz |
|
Summary of the changes
Here's some examples a. Load elasticsearch-hadoop library and distribute to spark cluster (sc.addJar()) but exclude some transitive dependencies, like cascading-local, pig, etc. b. Add local .m2 repository and load library from it c. Add remote maven repository (snapshot, https protocol) and load a library from it Ready to merge! |
|
Any tests to show that it works? |
|
@anthonycorbacho I've added basic test. oops test is failing.. |
|
Tested it locally - works like a charm. I could not find the way to list all loaded artifact and because of that I guess nothing can be done if user loads two different versions of the same library\dependency, so it's up to user (not to do it) |
|
@anthonycorbacho Added basic test. @bzz I modified API to make it return the list of dependency loaded. It's still not giving list of all loaded artifact so far. But it's giving list that loaded transitive dependency in particular z.load() call. Here's screenshot. I think it can be helpful a little. |
|
Thank you, this looks greeat to me |
|
What if we add addLocalMavenRepo API? it will be like |
|
I'm testing it,
|
|
@swkimme What i found so far is, Spark 1.2 has the same problem. Can you confirm the same error happening on Spark 1.2 with :cp command in bin/spark-shell ? Code for load library in Zeppelin is basically came from Spark 1.2. Therefore, to solve the problem we need completely different approach. |
|
I got same error in spark 1.2 shell. |
|
+1) does addMavenRepo feature work? When I run z.addMavenRepo("snapshots", "https://oss.sonatype.org/content/repositories/snapshots/", true) ----- result org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact eu.unicredit:hbase-rdd:jar:0.4.0-SNAPSHOT in central (http://repo1.maven.org/maven2/) |
|
@Leemoonsoo Isn't it great if we adopt that scala-version inference mechanism of SBT? |
|
@swkimme |
* Make recursive default * Exclude by pattern
Reliable dependency loading mechanism
Conflicts: spark/src/main/java/com/nflabs/zeppelin/spark/SparkInterpreter.java
Fix/Improve Dependency loader

Zeppelin has ability to load dependency library dynamically from local filesystem or remote maven repository. (see dependency loader)
However, it's buggy and not working correctly. this PR trying to fixes the problem and improve it's API.