You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2017/05/16 01:09:55 UTC

zeppelin git commit: [ZEPPELIN-2437] Executions of notebooks are blocked after running 50 different notebooks under SparkInterpreter scoped mode

Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.6 662b7d684 -> b8f4fb902


[ZEPPELIN-2437] Executions of notebooks are blocked after running 50 different notebooks under SparkInterpreter scoped mode

### What is this PR for?
Removes Scheduler when RemoteInterpreterServer close an interpreter.

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Cherry-Picks modifications from #2175 to fix "escaped interpreters" on RemoteInterpreterServer side(Need to be done in another PR)
* [x] - Removes Scheduler when calling RemoteInterpreterServer.close()

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-2437

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: z0621 <zh...@dtdream.com>

Closes #2319 from hammertank/ZEPPELIN-2437 and squashes the following commits:

118e138 [z0621] Remove Scheduler when Interpreter is closed


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/b8f4fb90
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/b8f4fb90
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/b8f4fb90

Branch: refs/heads/branch-0.6
Commit: b8f4fb90273dc1c6607eccd36c493590ad0486cb
Parents: 662b7d6
Author: z0621 <zh...@dtdream.com>
Authored: Mon May 8 18:19:26 2017 +0800
Committer: Lee moon soo <mo...@apache.org>
Committed: Mon May 15 18:09:51 2017 -0700

----------------------------------------------------------------------
 .../interpreter/remote/RemoteInterpreterServer.java      | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b8f4fb90/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
index c8e5f1e..ddd1394 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
@@ -39,6 +39,7 @@ import org.apache.zeppelin.scheduler.Job.Status;
 import org.apache.zeppelin.scheduler.JobListener;
 import org.apache.zeppelin.scheduler.JobProgressPoller;
 import org.apache.zeppelin.scheduler.Scheduler;
+import org.apache.zeppelin.scheduler.SchedulerFactory;
 import org.apache.zeppelin.user.AuthenticationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -226,10 +227,20 @@ public class RemoteInterpreterServer
           Interpreter inp = it.next();
           if (inp.getClassName().equals(className)) {
             inp.close();
+
+            Scheduler scheduler = inp.getScheduler();
+            if (scheduler != null) {
+              SchedulerFactory.singleton().removeScheduler(scheduler.getName());
+            }
+
             it.remove();
             break;
           }
         }
+
+        if (interpreters.isEmpty()) {
+          interpreterGroup.remove(noteId);
+        }
       }
     }
   }