zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mina...@apache.org
Subject zeppelin git commit: [HOTFIX] Keep interpreter group when save and restart
Date Tue, 28 Mar 2017 06:26:42 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 3a1228799 -> 6d0b2906e


[HOTFIX] Keep interpreter group when save and restart

### What is this PR for?
Not removing interpreter group reference while editing and saving interpreter setting.

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

### Todos
* [x] - Move `loadFromFile` into proper location

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

### How should this be tested?
1. Enable shiro for login
1. Execute sample code by %python and %pyspark
1. Switch spark interpreter from global mode to Per user mode and save it.
1. Switch python interpreter from Per user mode to global mode save it.
1. Shutdown zeppelin
1. Verify if there's no zombie processes

### 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: Jongyoul Lee <jongyoul@gmail.com>

Closes #2191 from jongyoul/hotfix/keep-interpreter-group-when-save-and-restart and squashes
the following commits:

a11ff40d [Jongyoul Lee] Moved the location of loadFromFile during restarting process


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

Branch: refs/heads/branch-0.7
Commit: 6d0b2906e6db3806b2473a03be5b1bd6f279b420
Parents: 3a12287
Author: Jongyoul Lee <jongyoul@gmail.com>
Authored: Mon Mar 27 17:35:07 2017 +0900
Committer: Mina Lee <minalee@apache.org>
Committed: Tue Mar 28 15:26:23 2017 +0900

----------------------------------------------------------------------
 .../zeppelin/interpreter/InterpreterSettingManager.java      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6d0b2906/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
index 32db89b..9b8dbec 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
@@ -151,7 +151,10 @@ public class InterpreterSettingManager {
     init();
   }
 
-  private void loadFromFile() {
+  /**
+   * Remember this method doesn't keep current connections after being called
+   */
+  private void  loadFromFile() {
     if (!Files.exists(interpreterBindingPath)) {
       // nothing to read
       return;
@@ -913,9 +916,8 @@ public class InterpreterSettingManager {
 
           saveToFile();
         } catch (Exception e) {
-          throw e;
-        } finally {
           loadFromFile();
+          throw e;
         }
       } else {
         throw new InterpreterException("Interpreter setting id " + id + " not found");


Mime
View raw message