mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Changed "restart" in interpreter tab to restart all of interpreterGroups in that interpreterSetting
This commit is contained in:
parent
bcccbb98cf
commit
8341348d68
3 changed files with 14 additions and 4 deletions
|
|
@ -190,7 +190,11 @@ public class InterpreterRestApi {
|
|||
RestartInterpreterRequest request = gson.fromJson(message, RestartInterpreterRequest.class);
|
||||
|
||||
String noteId = request == null ? null : request.getNoteId();
|
||||
interpreterSettingManager.restart(settingId, noteId, SecurityUtils.getPrincipal());
|
||||
if (null == noteId) {
|
||||
interpreterSettingManager.close(setting);
|
||||
} else {
|
||||
interpreterSettingManager.restart(settingId, noteId, SecurityUtils.getPrincipal());
|
||||
}
|
||||
notebookServer.clearParagraphRuntimeInfo(setting);
|
||||
|
||||
} catch (InterpreterException e) {
|
||||
|
|
|
|||
|
|
@ -274,9 +274,11 @@ public class InterpreterSetting {
|
|||
}
|
||||
|
||||
void closeAndRemoveAllInterpreterGroups() {
|
||||
HashSet<String> groupsToRemove = new HashSet<>(interpreterGroupRef.keySet());
|
||||
for (String key : groupsToRemove) {
|
||||
closeAndRemoveInterpreterGroupByNoteId(key);
|
||||
for (String processKey : new HashSet<>(interpreterGroupRef.keySet())) {
|
||||
InterpreterGroup interpreterGroup = interpreterGroupRef.get(processKey);
|
||||
for (String sessionKey : new HashSet<>(interpreterGroup.keySet())) {
|
||||
interpreterGroup.close(interpreterGroupRef, processKey, sessionKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1059,6 +1059,10 @@ public class InterpreterSettingManager {
|
|||
}
|
||||
}
|
||||
|
||||
public void close(InterpreterSetting interpreterSetting) {
|
||||
interpreterSetting.closeAndRemoveAllInterpreterGroups();
|
||||
}
|
||||
|
||||
public void close() {
|
||||
List<Thread> closeThreads = new LinkedList<>();
|
||||
synchronized (interpreterSettings) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue