-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Auto-restart interpreters on cron execution. #557
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
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.
Since 'resource' is not a term used in Zeppelin, i think
"Restart interpreter (release resource) after cron execution"
is more clear.
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.
how about "auto-restart interpreter on cron execution" that @bzz suggested?
|
Thanks @astroshim. This is really useful feature. |
|
Thank @Leemoonsoo your feedback. |
|
Wow, I did not realize that by "release resources" you mean full interpreter restart! May be we could call it something like "auto-restart interpreter on cron execution", then? Both in PR title and in Zeppelin UI. Or explore some ways to actually release resources without full interpreter restart (which seems much harder). |
|
@bzz Thanks your feedback. |
|
@astroshim I see, you are right, it's hard to say what else can do the job. I think if we just update the PR and the text in Zeppelin UI to something like "Auto-restart interpreters on cron execution" + add some tests, if possible - that would be great. What do you think? |
|
Dear @bzz |
|
Would it be possible the interpreter restart happens in the middle of another running notebook if more one are scheduled to around the same time? |
|
Actually I was trying to restart the spark interpreter first for each job run via REST API, but gave up because it throws EDIT: note After this, I couldn't handle interpreter via UI. Restart doesn't work so I should kill interpreter via Furthermore, if my understanding is right, interpreter restart aborts current jobs which are running or pending. So it would be better to restart interpreter manually. |
|
I think interpreter restart should abort pending / running jobs. |
|
@Leemoonsoo Btw, if we think it's valid to abort pending / running jobs, it may be better to add aborted jobs to pending queue automatically so that new interpreter process can run these, since we may couldn't recognize some jobs are aborted because of automatic interpreter restart. |
|
Hello. @felixcheung |
|
@astroshim right, I think separated interpreter process for cron job or similar would be a good approach for this issues. I know that there are places with a dozen of users sharing Zeppelin & interpreter and restarting interpreter seem dangerous. |
|
@Leemoonsoo Btw, I can't reproduce issue so my case shouldn't block this PR. But I agree with @felixcheung and another approach @astroshim stated is better than current approach. |
|
@felixcheung @HeartSaVioR |
|
User can create separate interpreter setting (e.g 'spark-cronjob') for cron scheduled notebook to avoid interpreter restart during other notebook uses. So I think this is good to be merged and further improvement(@felixcheung's suggestion) can be handled in a separate issue. |
|
@Leemoonsoo Thank you for making clear. |
|
Tested and LGTM. |
What is this PR for?
Release resource after cron schedule job.
What type of PR is it?
Improvement
Todos
Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-524.
How should this be tested?
please refer to the screenshots.
Screenshots (if appropriate)
Questions: