zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jongy...@apache.org
Subject zeppelin git commit: [HOTFIX] Keep interpreter group when save and restart
Date Tue, 28 Mar 2017 14:08:45 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 174244e20 -> 4a466d060


[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/4a466d06
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/4a466d06
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/4a466d06

Branch: refs/heads/master
Commit: 4a466d060598fec9e21fb1d77eea2825b73c70f4
Parents: 174244e
Author: Jongyoul Lee <jongyoul@gmail.com>
Authored: Mon Mar 27 17:35:07 2017 +0900
Committer: Jongyoul Lee <jongyoul@apache.org>
Committed: Tue Mar 28 23:08:18 2017 +0900

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


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4a466d06/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 f031591..bebbf35 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;
@@ -914,9 +917,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