[ZEPPELIN-2194] precode for PySparkInterpreter#2096
Conversation
|
Thanks @tinkoff-dwh for the contribution. If How about extend Interpreter.Hook() which currently has PRE_EXEC and POST_EXEC as event type that make code run before and after the interpret() call respectively. I think we can add event type such as what do you think? |
|
I think this is a good idea. I'm trying to implement this and test with task #2085 |
|
@Leemoonsoo I propose, then, is a global solution. Add two parameters and add |
|
@masyan Make sense! |
|
@Leemoonsoo |
|
close works, but open not. I don't understad why. Maybe run in InterpretJob.jobRun() |
|
and InterpreterContext is unavailable in method close.
|
|
Also, is |
|
|
Do you mind open PR or JIRA issue and discuss there for more generic way of run code before/after open/close ? I think it can be little complicated to discuss here. |
|
@Leemoonsoo |
# Conflicts: # docs/interpreter/spark.md # spark/src/main/java/org/apache/zeppelin/spark/PySparkInterpreter.java # spark/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterTest.java
|
Ready to review |
# Conflicts: # spark/src/test/java/org/apache/zeppelin/spark/PySparkInterpreterTest.java
|
#2221 general solution |
What is this PR for?
Added parameter
zeppelin.pyspark.precodeto PySparkInterpreter. This is snippet of code which executes when interpreter initialize.What type of PR is it?
Feature
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2194
How should this be tested?
precodeVar='some text'Questions: