-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[Zeppelin-630] Introduce new way of dependency loading to intepreter #673
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
* Manage repository information in `conf/interpreter.json` * Front-end modification to manage repository list * Add RestApi for adding/deleting repository * Fix tests
|
This is really nice feature and a lot of helpful for users. |
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.
Why do you use Console here?
Isnt it LOG better? so you can print log like LOG.warning('deprecated blablalba')?
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.
I used Console to print deprecated message in paragraph output through scala compiler.
Can we keep it as it is?
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.
I think printing message in the notebook is using Console is better in this case.
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.
agreed, i didnt know what it was doing so thats why i asked :)
|
Awesome |
|
@astroshim, @anthonycorbacho Thank you for the review. I pushed commits to address your comment. Please take a look into this again. |
|
Would it be possible to define dependency for a notebook? I suspect some users are currently having a %dep paragraph at the top of the notebook to bring down dependencies |
|
@felixcheung yes load dependency using %dep still works, and I simply added the deprecated message on the use of |
|
Tested and working well. 👍 |
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.
Input inline tags needs to be closed
dc5f4be to
387e21e
Compare
|
Every comments has been addressed and test/docs are updated. Ready for review |
bin/interpreter.sh
Outdated
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.
local repo would be .m2? don't we need to recursively add all jars in subdirectory then?
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.
Once user loads the libraries, Zeppelin downloads them to ZEPPELIN_HOME/local-repo first, and copy only files to ZEPPELIN_HOME/local-repo/{interpreterId}. So every file under this directory will be file, not directory. Maybe naming is confusing. Will it help to change name of this variable to ${LOCAL_REPO_INTERPRETER_DIR}?
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.
ah got it.
It's a bit confusing, as "local repository" is frequently used with Maven https://maven.apache.org/guides/introduction/introduction-to-repositories.html
"There are strictly only two types of repositories: local and remote. The local repository refers to a copy on your own installation that is a cache of the remote downloads, and also contains the temporary build artifacts that you have not yet released."
c854445 to
545c173
Compare
…into ZEPPELIN-630 Conflicts: zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
|
LGTM and merge if there're no more discussions. |
|
@minahlee thanks for this awesome feature! It seems to me that it does not save these settings on restarting zeppelin, however. Can you confirm that this is the expected behaviour? |
|
@FRosner Thank you for reporting it. Seems like you have misspelled |
|
Thanks for pointing this out! I will try to reproduce it in the next days and provide you with the logs. I had to use Internet Explorer at this time, so this might be the reason. Can I add artifacts that are local jars as well? So like with %dep z.load("/path/to/my.jar")? Thanks for your response :) |
|
@FRosner Yes you can also add local jars :) but you don't need to use %dep z.load("/path/to/my.jar") You can do this just by adding one more artifact( |
|
Understood @minahlee thank you. I will try it tomorrow and also reproduce the missing error message for you. Thanks again! |
|
Ok everything works as expected if I don't spell my dependencies wrong. However, if I do, I still get this empty error box. The logs show that the dependency does not exist so this seems to make sense. The browser I was using (new machine so I didn't have time to install a proper one), was Internet Explorer 11.0.9600.18124. |
|
@minahlee when I try to add a local jar that I added via |
|
FRosner I found the way to reproduce this bug. This happens when you have empty artifact in the rows other than the last row as below: I got the hint from Please let me know it's same as your case and try if it works when you have no empty artifact. Meanwhile I will try to create a patch for this bug sooner or later. |
|
Understood @minahlee. I did not have an empty row except the last one (with the + on the right) I think. But because there is a +, I was not able to remove it. Maybe this is the reason. Do you ignore the last row if it is empty? |
…fact is empty ### What is this PR for? This PR returns empty list of dependency files instead of throwing error when dependency artifact input form in interpreter setting is empty. ### What type of PR is it? Bug Fix ### Is there a relevant Jira issue? No. The bug is reported through comment in #673 ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Mina Lee <minalee@nflabs.com> Closes #716 from minahlee/fix/emptyArtifact and squashes the following commits: 22d5344 [Mina Lee] Return empty file list instead of throwing error when dependency artifact is empty
|
@minahlee Is there any follow up change about this ? I didn't find the repository management section in the interpreter page. |
|
@zjffdu If you click gear button located top right side, it will toggle repository management page |
|
Thanks @minahlee, it works. But any reason to make it hidden by default ? Because it is not intuitive for me that I can click the gear button to display it. |
|
I'm finding that using %dep interpreter no longer works for me on Zeppelin 0.6.0. Am I alone? e.g. Whereas this works: |
|
Haven't tried @nihakue. Can you try to load a jar through z.load? Maybe it's some issue related to Spark packages + %dep? And please keep in mind that you need to start the %dep as the very first thing before running anything else after restarting the interpreter. |
|
Hey @FRosner, What do you mean by loading a jar through z.load? Sorry, but isn't that what this does: Or do you mean a local jar? I can give that a shot. Also, I am running the %dep interpreter first thing. |






What is this PR for?
With this PR user will be able to set external libraries to be loaded to specific interpreter.
Note that the scope of this PR is downloading libraries to local repository, not distributing them to other nodes. Only spark interpreter distributes loaded dependencies to worker nodes at the moment.
Here is a brief explanation how the code works.
ZEPPELIN_HOME/local-repoand copy them toZEPPELIN_HOME/local-repo/{interpreterId}ZEPPELIN_HOME/local-repo/{interpreterId}/*.jarare added to interpreter classpath when interpreter process startsWhat type of PR is it?
Improvement
Todos
Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-630
And this PR will resolve ZEPPELIN-194 ZEPPELIN-381 ZEPPELIN-609
How should this be tested?
Add repository(in interpreter menu, click gear button placed top right side)
Set dependency in spark interpreter(click edit button of spark interpreter setting)
Download example csv file
run below code in paragraph
Screenshots (if appropriate)
Questions:
dependenciesobject should be added to request payload.