Repository: zeppelin Updated Branches: refs/heads/master 8a1becd9f -> d38b2661e
[HotFix] No Error message displayed in frontend when no interpreter binded ### What is this PR for? It is bug of ZEPPELIN-3013. HotFix for the No Error message displayed in frontend when no interpreter binded ### What type of PR is it? [Hot Fix ] ### Todos * [ ] - Task ### How should this be tested? Verified manually ### 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 #2655 from zjffdu/HotFix_ZEPPELIN-3013 and squashes the following commits: 89754a0 [Jeff Zhang] [HotFix] No Error message displayed in frontend when no interpreter is binded Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/d38b2661 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/d38b2661 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/d38b2661 Branch: refs/heads/master Commit: d38b2661eba7df12626ee958a4ec534f8492cdc3 Parents: 8a1becd Author: Jeff Zhang <zjf...@apache.org> Authored: Wed Nov 8 10:58:40 2017 +0800 Committer: Jeff Zhang <zjf...@apache.org> Committed: Wed Nov 8 18:57:07 2017 +0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/zeppelin/notebook/Paragraph.java | 2 -- .../src/test/java/org/apache/zeppelin/notebook/NoteTest.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d38b2661/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java ---------------------------------------------------------------------- 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 e304e4a..a38b222 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 @@ -188,11 +188,9 @@ public class Paragraph extends Job implements Cloneable, JsonSerializable { if (matcher.matches()) { String headingSpace = matcher.group(1); this.intpText = matcher.group(2); - this.interpreter = interpreterFactory.getInterpreter(user, note.getId(), intpText); this.scriptText = this.text.substring(headingSpace.length() + intpText.length() + 1).trim(); } else { this.intpText = ""; - this.interpreter = interpreterFactory.getInterpreter(user, note.getId(), ""); this.scriptText = this.text; } } http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d38b2661/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java ---------------------------------------------------------------------- diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java index 73046ff..286affd 100644 --- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java +++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java @@ -87,7 +87,7 @@ public class NoteTest { ArgumentCaptor<Paragraph> pCaptor = ArgumentCaptor.forClass(Paragraph.class); verify(scheduler, only()).submit(pCaptor.capture()); - verify(interpreterFactory, times(2)).getInterpreter(anyString(), anyString(), eq("spark")); + verify(interpreterFactory, times(1)).getInterpreter(anyString(), anyString(), eq("spark")); assertEquals("Paragraph text", pText, pCaptor.getValue().getText()); }