Repository: incubator-zeppelin Updated Branches: refs/heads/master 1846ae8ef -> 5bed7796f
[ZEPPELIN-716] fix a deadlock in RemoteInterpreter.open/init ### What is this PR for? Fix a deadlock in RemoteInterpreter.init() ### What type of PR is it? Bug Fix ### Todos ### What is the Jira issue? [ZEPPELIN-716](https://issues.apache.org/jira/browse/ZEPPELIN-716) ### How should this be tested? ### 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: Zhong Wang <wangzhong....@gmail.com> Closes #759 from zhongneu/remote-interpreter-deadlock and squashes the following commits: 3422f0c [Zhong Wang] fix deadlock in RemoteInterpreter.init() Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/5bed7796 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/5bed7796 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/5bed7796 Branch: refs/heads/master Commit: 5bed7796f1319077a75beccc1fe5d4018fba755a Parents: 1846ae8 Author: Zhong Wang <wangzhong....@gmail.com> Authored: Thu Mar 3 21:01:33 2016 -0800 Committer: Lee moon soo <m...@apache.org> Committed: Sat Mar 5 08:55:56 2016 -0800 ---------------------------------------------------------------------- .../org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/5bed7796/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java ---------------------------------------------------------------------- diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java index e4d4bff..535d3df 100644 --- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java +++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java @@ -131,6 +131,7 @@ public class RemoteInterpreter extends Interpreter { interpreterProcess.reference(getInterpreterGroup()); interpreterProcess.setMaxPoolSize( Math.max(this.maxPoolSize, interpreterProcess.getMaxPoolSize())); + String groupId = getInterpreterGroup().getId(); synchronized (interpreterProcess) { Client client = null; @@ -144,7 +145,7 @@ public class RemoteInterpreter extends Interpreter { try { logger.info("Create remote interpreter {}", getClassName()); property.put("zeppelin.interpreter.localRepo", localRepoPath); - client.createInterpreter(getInterpreterGroup().getId(), noteId, + client.createInterpreter(groupId, noteId, getClassName(), (Map) property); } catch (TException e) { broken = true;