Alex Goodman created ZEPPELIN-1423:
--------------------------------------
Summary: Allow users to specify pre/post-execute callbacks for
interpreters
Key: ZEPPELIN-1423
URL: https://issues.apache.org/jira/browse/ZEPPELIN-1423
Project: Zeppelin
Issue Type: New Feature
Components: Interpreters
Affects Versions: 0.6.1
Reporter: Alex Goodman
Assignee: Alex Goodman
Fix For: 0.7.0
Currently there is no easy way to specify
With ZEPPELIN-1344, one of the requirements for interactive inline matplotlib
plotting involves displaying images without explicitly calling a show()
function. Eg,
{code}
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
{code}
should display an inline image even without calling {{plt.show()}} if mpl's
interactive flag is enabled.
Currently this could be done in the pyspark interpreter by binding the figure's
byte-string representation to the AngularDisplay system (since that can easily
be updated through the matplotlib backend) but closing the figures (ie freeing
up memory) would have to manually be done by the user. Thus we would need a
post-execute callback that displays / cleans up all the active figure objects.
I will attempt to implement this using a new InterpreterCallback interface
which includes support for two event types, pre and post-execute (relative to
the paragraph). This would ideally lay down the foundation to make it possible
for users to specify their callback code to the interpreter.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)