Skip to content

Commit 3fdd8bb

Browse files
xiejiajunzjffdu
authored andcommitted
[ZEPPELIN-4712]remove paragraph failed due to Interpreter connection refused
### What is this PR for? - an interpreter process refused to connect due to it abnormal stop , which eventually caused the remove paragraph operation to fail to complete when i try remove a paragraph. ### What type of PR is it? - Bug Fix ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-4712 ### Questions: Does the licenses files need update? NO Is there breaking changes for older versions? NO Does this needs documentation? NO Author: xiejiajun <[email protected]> Author: xie-jia-jun <[email protected]> Closes #3710 from xiejiajun/branch-0.9 and squashes the following commits: 9bb7341 [xiejiajun] Merge remote-tracking branch 'origin/branch-0.9' into branch-0.9 9bc5605 [xiejiajun] bug fix: when we removing a paragraph , an interpreter process refused to connect due to it abnormal stop , which eventually caused the remove paragraph operation to fail to complete. 97d2714 [xie-jia-jun] Merge pull request #2 from apache/branch-0.9 9b3c744 [xiejiajun] added timeout for getting Thrift client to avoid situations where the interpreter may not be restarted when the interpreter process exits unexpectedly
1 parent f2b6d90 commit 3fdd8bb

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -676,20 +676,23 @@ public List<String> call(RemoteInterpreterService.Client client) throws Exceptio
676676
if (paragraphId != null) {
677677
resourceSet = resourceSet.filterByParagraphId(paragraphId);
678678
}
679-
680-
for (final Resource r : resourceSet) {
681-
remoteInterpreterProcess.callRemoteFunction(
682-
new RemoteInterpreterProcess.RemoteFunction<Void>() {
683-
684-
@Override
685-
public Void call(RemoteInterpreterService.Client client) throws Exception {
686-
client.resourceRemove(
687-
r.getResourceId().getNoteId(),
688-
r.getResourceId().getParagraphId(),
689-
r.getResourceId().getName());
690-
return null;
691-
}
692-
});
679+
try{
680+
for (final Resource r : resourceSet) {
681+
remoteInterpreterProcess.callRemoteFunction(
682+
new RemoteInterpreterProcess.RemoteFunction<Void>() {
683+
684+
@Override
685+
public Void call(RemoteInterpreterService.Client client) throws Exception {
686+
client.resourceRemove(
687+
r.getResourceId().getNoteId(),
688+
r.getResourceId().getParagraphId(),
689+
r.getResourceId().getName());
690+
return null;
691+
}
692+
});
693+
}
694+
}catch (Exception e){
695+
LOGGER.error(e.getMessage());
693696
}
694697
}
695698
}

0 commit comments

Comments
 (0)