-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[ZEPPELIN-1143] Interpreter dependencies are not downloaded on zeppelin start #1155
Conversation
@prabhjyotsingh How to deal with the case of getting error while downloading deps? Just edit and save it again? |
Yes, so far that is the only way we can download the dependency again. |
LGTM |
logger.error("Error while downloading repos for interpreter group :" + | ||
intpSetting.getGroup(), e); | ||
} catch (IOException e) { | ||
logger.error("Error while downloading repos for interpreter group :" + |
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.
you could combine the two catch clauses? or I would suggest having a different text log message for the exception
Merging this if no more discussion. |
LGTM |
A similar fix was made with https://github.com/apache/zeppelin/pull/755/files |
} | ||
} | ||
}; | ||
t.start(); |
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.
Should this be synchronous?
If there are number of deps, the download might take a longer time. But the interpreter will be ready to take the paras.
If the code executed depends on these deps, it will fail I guess(until the time it is downloaded). And pass again after it is downloaded. Which will be kind of unexpected behaviour.
I also think @karup1990's way is proper. |
setting.getGroup(), setting.getInterpreterInfos(), setting.getProperties(), | ||
setting.getDependencies(), setting.getOption()); | ||
|
||
try { | ||
synchronized (interpreterSettings) { | ||
loadInterpreterDependencies(intpSetting); |
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.
The issue that i faced when loading interpreters synchronously:
The dependencies can take some time(time to download from mvn , erroneous scenarios etc). This will block loading other interpreters(since it is load method).
But the Notebook websocket server is running. The notebooks web UI will render properly. But when a para is run, the UI will seems to not respond(the para status will not change), because the interpreter might not have got loaded or in the process of being loaded.
It is good to show some UI feedback in these cases.
@prabhjyotsingh
# Conflicts: # zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java
e7f872d
to
5aefc5c
Compare
@karup1990 have tried to implement the behaviour that you were asking about, can you take a look. Have added a GIF in PR description. |
Thanks for addressing the feedbacks @prabhjyotsingh .. |
if (isDownloading) { | ||
$timeout(function() { | ||
getInterpreterSettings(); | ||
}, 2000); |
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.
This timeout period will vary based on the number of dependencies.
Should we have Zeppelin broadcast a message when it is done with the downloading?
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.
Yes I thought about it, but I'll take care of this in another PR, where instead of doing a get call, migrate this web-sockets.
Have uploaded the GIF again, I think it would have failed last time. |
@@ -26,6 +26,7 @@ angular.module('zeppelinWebApp').controller('InterpreterCtrl', | |||
var getInterpreterSettings = function() { | |||
$http.get(baseUrlSrv.getRestApiBase() + '/interpreter/setting').success(function(data, status, headers, config) { | |||
$scope.interpreterSettings = data.body; | |||
checkDownloadingDependencies(); |
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.
This loop getInterpreterSettings
<> checkDownloadingDependencies
(this in turn iterates through setting) will be executed until the dependencies are downloaded.
Should be fine?
Otherwise, lgtm
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.
Have added another condition that will check for route url, and if it is not /interpreter
stop requesting for getInterpreterSettings().
Will merge this if no more discussion. |
…in start ### What is this PR for? While saving interpreter setting, if zeppelin server crashed/killed/restarted by user or there was some internet/download related (intermittent issue) because of which, or any other issue because of which dependencies were not downloaded. In any such condition, when zeppelin is started/restarted, server should try and download dependencies. ### What type of PR is it? [Improvement] ### What is the Jira issue? * [ZEPPELIN-1143](https://issues.apache.org/jira/browse/ZEPPELIN-1143) ### SCREENSHOT ![zeppelin-1143](https://cloud.githubusercontent.com/assets/674497/17025872/7d94d3e4-4f7b-11e6-9182-3e84f0badbab.gif) ### How should this be tested? - Put a dependency (say "org.apache.commons:commons-csv:1.1") in any of the interpreter. - from command line delete `local-repo` directory - restart zeppelin server expectation is `local-repo` should be recreated with all the dependencies that were mentioned in any of the interpreters. ### Questions: * Does the licenses files need update? n/a * Is there breaking changes for older versions? n/a * Does this needs documentation? n/a Author: Prabhjyot Singh <prabhjyotsingh@gmail.com> Closes apache#1155 from prabhjyotsingh/ZEPPELIN-1143 and squashes the following commits: 36cc81d [Prabhjyot Singh] on change of route, stop requesting for getInterpreterSettings() 5aefc5c [Prabhjyot Singh] show update of interpreter dependencies in UI 4f2484a [Prabhjyot Singh] Merge remote-tracking branch 'origin/master' into ZEPPELIN-1143 c12c43d [Prabhjyot Singh] address @karup1990 feedback 6ad14a7 [Prabhjyot Singh] Address @felixcheung feedback fb869e8 [Prabhjyot Singh] ZEPPELIN-1143 Interpreter dependencies are not downloaded on zeppelin start
…in start While saving interpreter setting, if zeppelin server crashed/killed/restarted by user or there was some internet/download related (intermittent issue) because of which, or any other issue because of which dependencies were not downloaded. In any such condition, when zeppelin is started/restarted, server should try and download dependencies. [Improvement] * [ZEPPELIN-1143](https://issues.apache.org/jira/browse/ZEPPELIN-1143) ![zeppelin-1143](https://cloud.githubusercontent.com/assets/674497/17025872/7d94d3e4-4f7b-11e6-9182-3e84f0badbab.gif) - Put a dependency (say "org.apache.commons:commons-csv:1.1") in any of the interpreter. - from command line delete `local-repo` directory - restart zeppelin server expectation is `local-repo` should be recreated with all the dependencies that were mentioned in any of the interpreters. * Does the licenses files need update? n/a * Is there breaking changes for older versions? n/a * Does this needs documentation? n/a Author: Prabhjyot Singh <prabhjyotsingh@gmail.com> Closes apache#1155 from prabhjyotsingh/ZEPPELIN-1143 and squashes the following commits: 36cc81d [Prabhjyot Singh] on change of route, stop requesting for getInterpreterSettings() 5aefc5c [Prabhjyot Singh] show update of interpreter dependencies in UI 4f2484a [Prabhjyot Singh] Merge remote-tracking branch 'origin/master' into ZEPPELIN-1143 c12c43d [Prabhjyot Singh] address @karup1990 feedback 6ad14a7 [Prabhjyot Singh] Address @felixcheung feedback fb869e8 [Prabhjyot Singh] ZEPPELIN-1143 Interpreter dependencies are not downloaded on zeppelin start (cherry picked from commit 21a084b)
What is this PR for?
While saving interpreter setting, if zeppelin server crashed/killed/restarted by user or there was some internet/download related (intermittent issue) because of which, or any other issue because of which dependencies were not downloaded.
In any such condition, when zeppelin is started/restarted, server should try and download dependencies.
What type of PR is it?
[Improvement]
What is the Jira issue?
SCREENSHOT
How should this be tested?
local-repo
directoryexpectation is
local-repo
should be recreated with all the dependencies that were mentioned in any of the interpreters.Questions: