Repository: incubator-zeppelin Updated Branches: refs/heads/master ba67a3a10 -> 67f7f3e40
Fix redundant synchronization on same object. Very minor - haven't created a jira for this. Discussion here: https://github.com/apache/incubator-zeppelin/commit/356c02fbfebec72de1f2c2383278d599d6fabeaa#commitcomment-12477286 Author: Rohit Agarwal <[email protected]> Closes #177 from mindprince/sync-fix and squashes the following commits: ad9b5ca [Rohit Agarwal] Fix redundant synchronization on same object. Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/67f7f3e4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/67f7f3e4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/67f7f3e4 Branch: refs/heads/master Commit: 67f7f3e403bdaa84b75f72241c418842fcc13696 Parents: ba67a3a Author: Rohit Agarwal <[email protected]> Authored: Sun Aug 2 19:00:09 2015 -0700 Committer: Lee moon soo <[email protected]> Committed: Tue Aug 4 17:43:04 2015 +0900 ---------------------------------------------------------------------- .../interpreter/InterpreterFactory.java | 26 +++++++++----------- 1 file changed, 12 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/67f7f3e4/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java ---------------------------------------------------------------------- diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java index 57e2b7a..f753d5e 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java @@ -526,20 +526,18 @@ public class InterpreterFactory { public void restart(String id) { synchronized (interpreterSettings) { - synchronized (interpreterSettings) { - InterpreterSetting intpsetting = interpreterSettings.get(id); - if (intpsetting != null) { - intpsetting.getInterpreterGroup().close(); - intpsetting.getInterpreterGroup().destroy(); - - InterpreterGroup interpreterGroup = createInterpreterGroup( - intpsetting.id(), - intpsetting.getGroup(), intpsetting.getOption(), intpsetting.getProperties()); - intpsetting.setInterpreterGroup(interpreterGroup); - } else { - throw new InterpreterException("Interpreter setting id " + id - + " not found"); - } + InterpreterSetting intpsetting = interpreterSettings.get(id); + if (intpsetting != null) { + intpsetting.getInterpreterGroup().close(); + intpsetting.getInterpreterGroup().destroy(); + + InterpreterGroup interpreterGroup = createInterpreterGroup( + intpsetting.id(), + intpsetting.getGroup(), intpsetting.getOption(), intpsetting.getProperties()); + intpsetting.setInterpreterGroup(interpreterGroup); + } else { + throw new InterpreterException("Interpreter setting id " + id + + " not found"); } } }
