You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2021/02/18 03:42:54 UTC
[zeppelin] branch master updated: [ZEPPELIN-5233]. Clear output
before running paragraph
This is an automated email from the ASF dual-hosted git repository.
zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new dfed9b8 [ZEPPELIN-5233]. Clear output before running paragraph
dfed9b8 is described below
commit dfed9b88b4117d2db754e5236d4a3af2d1e1dd75
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Wed Feb 3 14:06:44 2021 +0800
[ZEPPELIN-5233]. Clear output before running paragraph
### What is this PR for?
Trivial PR to clean output before running paragraph. setStatus will broadcast paragraph to frontend. That means the output in frontend will be cleaned before running
### What type of PR is it?
[ Improvement ]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5233
### How should this be tested?
* Ci pass
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jeff Zhang <zj...@apache.org>
Closes #4043 from zjffdu/ZEPPELIN-5233 and squashes the following commits:
9d5abed6e [Jeff Zhang] [ZEPPELIN-5233]. Clear output before running paragraph
---
.../src/main/java/org/apache/zeppelin/notebook/Paragraph.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
index d6f92a6..b3f1557 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
@@ -350,6 +350,11 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult> implemen
= interpreterSetting.getConfig(interpreter.getClassName());
mergeConfig(config);
+ // clear output
+ setResult(null);
+ cleanOutputBuffer();
+ cleanRuntimeInfos();
+
setStatus(Status.PENDING);
if (shouldSkipRunParagraph()) {