This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new defb785 [ZEPPELIN-4524]. Paragraph keep in RUNNING state if its interpreter download is not ready defb785 is described below commit defb785a36c258b5ac07df47d797237857e6607a Author: Jeff Zhang <zjf...@apache.org> AuthorDate: Sun Dec 29 23:07:17 2019 +0800 [ZEPPELIN-4524]. Paragraph keep in RUNNING state if its interpreter download is not ready ### What is this PR for? This PR is a straightforward fix that just throw exception when interpreter setting is not ready, error message will be displayed in frontend. ### What type of PR is it? [Bug Fix] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-4524 ### How should this be tested? * CI pass ### 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: Jeff Zhang <zjf...@apache.org> Closes #3580 from zjffdu/ZEPPELIN-4524 and squashes the following commits: 9f78a4189 [Jeff Zhang] [ZEPPELIN-4524]. Paragraph keep in RUNNING state if its interpreter download is not ready --- .../test/java/org/apache/zeppelin/service/NotebookServiceTest.java | 1 + .../src/main/java/org/apache/zeppelin/notebook/Paragraph.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java index e4df8c3..8201f26 100644 --- a/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java +++ b/zeppelin-server/src/test/java/org/apache/zeppelin/service/NotebookServiceTest.java @@ -103,6 +103,7 @@ public class NotebookServiceTest { InterpreterSetting mockInterpreterSetting = mock(InterpreterSetting.class); when(mockInterpreterSetting.isUserAuthorized(any())).thenReturn(true); when(mockInterpreterGroup.getInterpreterSetting()).thenReturn(mockInterpreterSetting); + when(mockInterpreterSetting.getStatus()).thenReturn(InterpreterSetting.Status.READY); SearchService searchService = new LuceneSearch(zeppelinConfiguration); Credentials credentials = new Credentials(false, null, null); Notebook notebook = diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java index 482455c..8a32214 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java @@ -453,8 +453,11 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult> implemen getId(), this.interpreter.getClassName(), note.getId(), subject.getUser()); InterpreterSetting interpreterSetting = ((ManagedInterpreterGroup) interpreter.getInterpreterGroup()).getInterpreterSetting(); - if (interpreterSetting != null) { - interpreterSetting.waitForReady(); + if (interpreterSetting.getStatus() != InterpreterSetting.Status.READY) { + String message = String.format("Interpreter Setting '%s' is not ready, its status is %s", + interpreterSetting.getName(), interpreterSetting.getStatus()); + LOGGER.error(message); + throw new RuntimeException(message); } if (this.user != null) { if (subject != null && !interpreterSetting.isUserAuthorized(subject.getUsersAndRoles())) {