Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-19

Failures from disabled interpreters not reported

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.0
    • Component/s: None
    • Labels:
      None

      Description

      On a note, if an interpreter is disabled for any reason, errors from paragraph execution not surfaced to the user. This can also happen on interpreter startup failures.

      The logs do have an NPE in them, but it would be good to give the user some feedback on the failure.

      Pull request to follow shortly.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user RamVenkatesh opened a pull request:

          https://github.com/apache/incubator-zeppelin/pull/22

          ZEPPELIN-19 Failures from disabled interpreters not reported

          Handle all exceptions from NotebookServer runParagraph and update Note

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/RamVenkatesh/incubator-zeppelin ZEPPELIN-19

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/incubator-zeppelin/pull/22.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #22


          commit 4576183b29efa1e6af6ed1eec389cfd459e4917a
          Author: Ram Venkatesh <rvenkatesh@hortonworks.com>
          Date: 2015-04-01T06:07:32Z

          ZEPPELIN-19 Failures from disabled interpreters not reported
          Handle all exceptions from NotebookServer runParagraph and update Note


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user RamVenkatesh opened a pull request: https://github.com/apache/incubator-zeppelin/pull/22 ZEPPELIN-19 Failures from disabled interpreters not reported Handle all exceptions from NotebookServer runParagraph and update Note You can merge this pull request into a Git repository by running: $ git pull https://github.com/RamVenkatesh/incubator-zeppelin ZEPPELIN-19 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-zeppelin/pull/22.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22 commit 4576183b29efa1e6af6ed1eec389cfd459e4917a Author: Ram Venkatesh <rvenkatesh@hortonworks.com> Date: 2015-04-01T06:07:32Z ZEPPELIN-19 Failures from disabled interpreters not reported Handle all exceptions from NotebookServer runParagraph and update Note
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user felixcheung commented on the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88550379

          LGTM!

          Show
          githubbot ASF GitHub Bot added a comment - Github user felixcheung commented on the pull request: https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88550379 LGTM!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user RamVenkatesh commented on the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88569684

          @felixcheung one question - I see that the paragraph has the error message but it is not displayed on the web UI until the note is refreshed. Do you have any suggestions on how to fix this refresh issue?

          Show
          githubbot ASF GitHub Bot added a comment - Github user RamVenkatesh commented on the pull request: https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88569684 @felixcheung one question - I see that the paragraph has the error message but it is not displayed on the web UI until the note is refreshed. Do you have any suggestions on how to fix this refresh issue?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user felixcheung commented on the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88643458

          I think you need to call Paragraph.completion() like note.run() does...

          Show
          githubbot ASF GitHub Bot added a comment - Github user felixcheung commented on the pull request: https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88643458 I think you need to call Paragraph.completion() like note.run() does...
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user RamVenkatesh commented on the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88750225

          @felixcheung thank you. I have updated the patch to set the status to ERROR. This triggers a broadcast and the Note status is now correctly displayed on the web ui.

          Show
          githubbot ASF GitHub Bot added a comment - Github user RamVenkatesh commented on the pull request: https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-88750225 @felixcheung thank you. I have updated the patch to set the status to ERROR. This triggers a broadcast and the Note status is now correctly displayed on the web ui.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on a diff in the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27654371

          — Diff: zeppelin-interpreter/src/main/java/com/nflabs/zeppelin/scheduler/Job.java —
          @@ -237,4 +238,8 @@ public Date getDateFinished() {
          private Logger logger()

          { return LoggerFactory.getLogger(Job.class); }

          +
          + protected void setResult(InterpreterResult result) {
          — End diff –

          Could you make setResult(Object result) instead of setResult(InterpreterResult result)?
          Because of Job is designed to allow any java object as a result.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on a diff in the pull request: https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27654371 — Diff: zeppelin-interpreter/src/main/java/com/nflabs/zeppelin/scheduler/Job.java — @@ -237,4 +238,8 @@ public Date getDateFinished() { private Logger logger() { return LoggerFactory.getLogger(Job.class); } + + protected void setResult(InterpreterResult result) { — End diff – Could you make setResult(Object result) instead of setResult(InterpreterResult result)? Because of Job is designed to allow any java object as a result.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on a diff in the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27655027

          — Diff: zeppelin-zengine/src/main/java/com/nflabs/zeppelin/notebook/Note.java —
          @@ -231,6 +232,9 @@ public void run(String paragraphId) {
          p.setNoteReplLoader(replLoader);
          p.setListener(jobListenerFactory.getParagraphJobListener(this));
          Interpreter intp = replLoader.get(p.getRequiredReplName());
          + if (intp == null) {
          — End diff –

          When user try to use non-exists interpreter, for example run `%nonexist statment`, it raise null pointer exception at previous line and this conditional block won't be executed.

          In this case, there's an exception in log file
          ```
          ERROR [2015-04-02 22:01:36,584] (

          {WebSocketWorker-8}

          NotebookServer.java[runParagraph]:431) - Exception from run
          java.lang.NullPointerException
          at com.nflabs.zeppelin.notebook.NoteInterpreterLoader.get(NoteInterpreterLoader.java:70)
          at com.nflabs.zeppelin.notebook.Note.run(Note.java:234)
          at com.nflabs.zeppelin.socket.NotebookServer.runParagraph(NotebookServer.java:428)
          at com.nflabs.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:96)
          at org.java_websocket.server.WebSocketServer.onWebsocketMessage(WebSocketServer.java:469)
          at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:368)
          at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:157)
          at org.java_websocket.server.WebSocketServer$WebSocketWorker.run(WebSocketServer.java:657)
          ```

          but gui does not display it.
          ![image](https://cloud.githubusercontent.com/assets/1540981/6964574/7b46b4a8-d985-11e4-85df-28de3a0d5a92.png)

          Could you handle this case, too?

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on a diff in the pull request: https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27655027 — Diff: zeppelin-zengine/src/main/java/com/nflabs/zeppelin/notebook/Note.java — @@ -231,6 +232,9 @@ public void run(String paragraphId) { p.setNoteReplLoader(replLoader); p.setListener(jobListenerFactory.getParagraphJobListener(this)); Interpreter intp = replLoader.get(p.getRequiredReplName()); + if (intp == null) { — End diff – When user try to use non-exists interpreter, for example run `%nonexist statment`, it raise null pointer exception at previous line and this conditional block won't be executed. In this case, there's an exception in log file ``` ERROR [2015-04-02 22:01:36,584] ( {WebSocketWorker-8} NotebookServer.java [runParagraph] :431) - Exception from run java.lang.NullPointerException at com.nflabs.zeppelin.notebook.NoteInterpreterLoader.get(NoteInterpreterLoader.java:70) at com.nflabs.zeppelin.notebook.Note.run(Note.java:234) at com.nflabs.zeppelin.socket.NotebookServer.runParagraph(NotebookServer.java:428) at com.nflabs.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:96) at org.java_websocket.server.WebSocketServer.onWebsocketMessage(WebSocketServer.java:469) at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:368) at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:157) at org.java_websocket.server.WebSocketServer$WebSocketWorker.run(WebSocketServer.java:657) ``` but gui does not display it. ! [image] ( https://cloud.githubusercontent.com/assets/1540981/6964574/7b46b4a8-d985-11e4-85df-28de3a0d5a92.png ) Could you handle this case, too?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user RamVenkatesh commented on a diff in the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27712776

          — Diff: zeppelin-interpreter/src/main/java/com/nflabs/zeppelin/scheduler/Job.java —
          @@ -237,4 +238,8 @@ public Date getDateFinished() {
          private Logger logger()

          { return LoggerFactory.getLogger(Job.class); }

          +
          + protected void setResult(InterpreterResult result) {
          — End diff –

          Done!

          Show
          githubbot ASF GitHub Bot added a comment - Github user RamVenkatesh commented on a diff in the pull request: https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27712776 — Diff: zeppelin-interpreter/src/main/java/com/nflabs/zeppelin/scheduler/Job.java — @@ -237,4 +238,8 @@ public Date getDateFinished() { private Logger logger() { return LoggerFactory.getLogger(Job.class); } + + protected void setResult(InterpreterResult result) { — End diff – Done!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user RamVenkatesh commented on a diff in the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27712863

          — Diff: zeppelin-zengine/src/main/java/com/nflabs/zeppelin/notebook/Note.java —
          @@ -231,6 +232,9 @@ public void run(String paragraphId) {
          p.setNoteReplLoader(replLoader);
          p.setListener(jobListenerFactory.getParagraphJobListener(this));
          Interpreter intp = replLoader.get(p.getRequiredReplName());
          + if (intp == null) {
          — End diff –

          @Leemoonsoo thank you for the review.

          I have made the following changes:
          1. for NPEs getMessage() is null, hence no error is shown on the GUI. I have fixed this in InterpreterUtils.getMostRelevantMessage
          2. added a test for this specific case to throw an InterpreterException instead of NPE

          Show
          githubbot ASF GitHub Bot added a comment - Github user RamVenkatesh commented on a diff in the pull request: https://github.com/apache/incubator-zeppelin/pull/22#discussion_r27712863 — Diff: zeppelin-zengine/src/main/java/com/nflabs/zeppelin/notebook/Note.java — @@ -231,6 +232,9 @@ public void run(String paragraphId) { p.setNoteReplLoader(replLoader); p.setListener(jobListenerFactory.getParagraphJobListener(this)); Interpreter intp = replLoader.get(p.getRequiredReplName()); + if (intp == null) { — End diff – @Leemoonsoo thank you for the review. I have made the following changes: 1. for NPEs getMessage() is null, hence no error is shown on the GUI. I have fixed this in InterpreterUtils.getMostRelevantMessage 2. added a test for this specific case to throw an InterpreterException instead of NPE
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Leemoonsoo commented on the pull request:

          https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-89530239

          LGTM. Thanks for the contribution

          Show
          githubbot ASF GitHub Bot added a comment - Github user Leemoonsoo commented on the pull request: https://github.com/apache/incubator-zeppelin/pull/22#issuecomment-89530239 LGTM. Thanks for the contribution
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/incubator-zeppelin/pull/22

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/incubator-zeppelin/pull/22
          Hide
          moon Lee moon soo added a comment -
          Show
          moon Lee moon soo added a comment - Issue resolved by pull request 22 https://github.com/apache/incubator-zeppelin/pulls/22

            People

            • Assignee:
              venkateshrin Ram Venkatesh
              Reporter:
              venkateshrin Ram Venkatesh
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development