mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix code style
This commit is contained in:
parent
2cea65bff3
commit
f9ea386453
2 changed files with 10 additions and 13 deletions
|
|
@ -635,7 +635,7 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', function($scope, $ro
|
|||
callback: function(result) {
|
||||
if (result) {
|
||||
var payload = {
|
||||
'noteId' : $scope.note.id
|
||||
'noteId': $scope.note.id
|
||||
};
|
||||
|
||||
$http.put(baseUrlSrv.getRestApiBase() + '/interpreter/setting/restart/' + interpeter.id, payload)
|
||||
|
|
|
|||
|
|
@ -857,22 +857,19 @@ public class InterpreterFactory implements InterpreterGroupFactory {
|
|||
return noteId == null ? false : true;
|
||||
}
|
||||
|
||||
private boolean isNotSharedInterpreter(InterpreterOption intpOption) {
|
||||
return intpOption.isPerNoteSession() || intpOption.isConnectExistingProcess();
|
||||
}
|
||||
|
||||
|
||||
public void restart(String settingId, String noteId) {
|
||||
InterpreterSetting setting = interpreterSettings.get(settingId);
|
||||
|
||||
if (noteIdIsExist(noteId)) {
|
||||
if (setting.getOption().isPerNoteProcess()) {
|
||||
setting.closeAndRemoveInterpreterGroup(noteId);
|
||||
} else if (setting.getOption().isPerNoteSession()) {
|
||||
InterpreterGroup interpreterGroup = setting.getInterpreterGroup(noteId);
|
||||
interpreterGroup.close(noteId);
|
||||
interpreterGroup.destroy(noteId);
|
||||
} else {
|
||||
restart(settingId);
|
||||
}
|
||||
} else {
|
||||
restart(settingId);
|
||||
if (noteIdIsExist(noteId) && isNotSharedInterpreter(setting.getOption())) {
|
||||
removeInterpretersForNote(setting, noteId);
|
||||
return;
|
||||
}
|
||||
restart(settingId);
|
||||
}
|
||||
|
||||
public void restart(String id) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue