zeppelin icon indicating copy to clipboard operation
zeppelin copied to clipboard

[ZEPPELIN-4413] Added a close note button on zepp ui to shut down sc and release roso…

Open amakaur opened this issue 5 years ago • 2 comments

What is this PR for?

Adds the ability to shut down interpreter and free allocated resources for a notebook via zeppelin ui.

This makes it easy to close the notebook by clicking on one button

What type of PR is it?

Feature

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-4413

How should this be tested?

  • Create a new notebook and use spark interpreter
  • Click on close button between "clear output" and "clone this note"

Screenshots (if appropriate)

image

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

amakaur avatar Oct 31 '19 02:10 amakaur

You can release the interpreter resource by clicking restart interpreters in the note page. Or even you can set the LifecycleManager to be TimeoutLifecycleManager so that by default interpreter will be closed after 1 hour idle. It doesn't seem very reasonable to add such feature, or could you explain more about it ?

zjffdu avatar Nov 24 '19 14:11 zjffdu

@zjffdu 1. We're already using TimeoutLifecycleManager to release the resources automatically after 1 hour, but there's an issue with closing notebook this way where https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/ManagedInterpreterGroup.java#L88 close(sessionId) wouldn't get triggered for some of the notebooks randomly and spark context would be alive for couple of days until zeppelin is restarted or notebook is closed using the feature in this PR.

Also, we would like the ability to close the notebook at any moment without depending on the timeout.

  1. Restarting the interpreter causes notebooks to get stuck in a pending state a lot of the times. So this helps to completely shut down the spark context and bring back the notebook in a fresh clean state.

  2. This is similar to https://github.com/apache/zeppelin/pull/3501 but requires less work from the user to close the note. This makes it easy for any user to reset the state of their notebook.

amakaur avatar Nov 30 '19 02:11 amakaur