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 2020/07/14 07:13:04 UTC

[zeppelin] branch branch-0.9 updated: [ZEPPELIN-4951]. Set paragraph status to be abort when recovery is disabled

This is an automated email from the ASF dual-hosted git repository.

zjffdu pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.9 by this push:
     new 480c23d  [ZEPPELIN-4951]. Set paragraph status to be abort when recovery is disabled
480c23d is described below

commit 480c23d9c497a6b4ae522bb5bdeb08840918ee54
Author: Jeff Zhang <zj...@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 <zj...@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
    
    (cherry picked from commit 85815043832e8bde698e851556b9e6e59fd7039f)
    Signed-off-by: Jeff Zhang <zj...@apache.org>
---
 .../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) {