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 8581504 [ZEPPELIN-4951]. Set paragraph status to be abort when recovery is disabled 8581504 is described below commit 85815043832e8bde698e851556b9e6e59fd7039f Author: Jeff Zhang <zjf...@apache.org> AuthorDate: Mon Jul 13 23:28:42 2020 +0800 [ZEPPELIN-4951]. Set paragraph status to be abort when recovery is disabled ### What is this PR for? A simple PR which set paragraph status to be abort when loading note and recovery is disabled. Otherwise we would see paragraph is in running state and we are unable to abort it because we have lost the connection to the interpreter process when recovery is disabled. ### What type of PR is it? [Bug Fix ] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-4951 ### How should this be tested? * CI ### 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 <zjf...@apache.org> Closes #3853 from zjffdu/ZEPPELIN-4951 and squashes the following commits: e5d211367 [Jeff Zhang] [ZEPPELIN-4951]. Set paragraph status to be abort when recovery is disabled --- .../src/main/java/org/apache/zeppelin/notebook/Note.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java index 447bd2d..a55567b 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java @@ -129,7 +129,7 @@ public class Note implements JsonSerializable { private transient ParagraphJobListener paragraphJobListener; private transient List<NoteEventListener> noteEventListeners = new ArrayList<>(); private transient Credentials credentials; - + private transient ZeppelinConfiguration zConf = ZeppelinConfiguration.create(); public Note() { generateId(); @@ -148,7 +148,7 @@ public class Note implements JsonSerializable { this.version = Util.getVersion(); generateId(); - setCronSupported(ZeppelinConfiguration.create()); + setCronSupported(zConf); } public Note(NoteInfo noteInfo) { @@ -1132,6 +1132,9 @@ public class Note implements JsonSerializable { if (p.getStatus() == Status.PENDING) { p.setStatus(Status.ABORT); } + if (p.getStatus() == Status.RUNNING && !zConf.isRecoveryEnabled()) { + p.setStatus(Status.ABORT); + } List<ApplicationState> appStates = p.getAllApplicationStates(); if (appStates != null) {