Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.1
    • 0.8.0
    • livy-interpreter
    • None
    • zeppelin-0.7.1,livy-0.4-snapshot

    Description

      I am using Livy interpreter to interact with spark cluster. However, every time some error occurs,Zeppelin only print one line of error message which is extremely unhelpful to debug the code.
      For example, If I get the following error output in Zeppelin:

      <console>:113: error: overloaded method value createDataFrame with alternatives:

      I can't found out exactly what caused the error.

      But executing the same code on spark shell I would get the following error :

      <console>:56: error: overloaded method value createDataFrame with alternatives:
      (data: java.util.List[_],beanClass: Class[_])org.apache.spark.sql.DataFrame <and>
      (rdd: org.apache.spark.api.java.JavaRDD[_],beanClass: Class[_])org.apache.spark.sql.DataFrame <and>
      (rdd: org.apache.spark.rdd.RDD[_],beanClass: Class[_])org.apache.spark.sql.DataFrame <and>
      (rows: java.util.List[org.apache.spark.sql.Row],schema: org.apache.spark.sql.types.StructType)org.apache.spark.sql.DataFrame <and>
      (rowRDD: org.apache.spark.api.java.JavaRDD[org.apache.spark.sql.Row],schema: org.apache.spark.sql.types.StructType)org.apache.spark.sql.DataFrame <and>
      (rowRDD: org.apache.spark.rdd.RDD[org.apache.spark.sql.Row],schema: org.apache.spark.sql.types.StructType)org.apache.spark.sql.DataFrame
      cannot be applied to (org.apache.spark.rdd.RDD[String], org.apache.spark.sql.types.StructType)
      val testDF = spark.createDataFrame(rdds, schema)

      All the detailed error log is returned by Livy server, but in another field called "traceback". In BaseLivyInterpreter.java, Zepplein only print out the "evalue" which contain only the header line of the error log.

      I think print "traceback" log would be much more helpful to debug spark job when using Livy.

      Attachments

        Activity

          zjffdu Jeff Zhang added a comment -

          Thanks heyang wang for reporting this issue, feel free to create a PR if you want to contribute to zeppelin.

          zjffdu Jeff Zhang added a comment - Thanks heyang wang for reporting this issue, feel free to create a PR if you want to contribute to zeppelin.
          githubbot ASF GitHub Bot added a comment -

          GitHub user qwemicheal opened a pull request:

          https://github.com/apache/zeppelin/pull/2390

          ZEPPELIN-2589Let zeppelin show more than one line of error log returned by livy.

              1. What is this PR for?
                Let zeppelin show more than one line of error log returned by livy.
              1. What type of PR is it?
                Improvement
              1. What is the Jira issue?
                [ZEPPELIN-2589
                ](https://issues.apache.org/jira/browse/ZEPPELIN-2589)
              1. How should this be tested?
                1. build: mvn clean package -DskipTests;
                2. /bin/zeppelin-daemon.sh restart
                3. Start a notebook
                4. Use Livy interpreter and input some erroneous spark code, check the shown result is more than one line
              1. Screenshots (if appropriate)
                before
                ![screenshot from 2017-06-02 20-29-02](https://cloud.githubusercontent.com/assets/14201792/26726496/e5611d9a-47d5-11e7-9dba-6e304cee9b41.png)
                after
                ![screenshot from 2017-06-02 20-53-03](https://cloud.githubusercontent.com/assets/14201792/26726548/14e3fd80-47d6-11e7-8dcb-0ddd21aae2cd.png)
              1. Questions:
          • Does the licenses files need update?No
          • Is there breaking changes for older versions? No
          • Does this needs documentation? No

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

          $ git pull https://github.com/qwemicheal/zeppelin master

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

          https://github.com/apache/zeppelin/pull/2390.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 #2390


          commit 905c54d7607fd07d25c3369fb1f7cf200c3a2460
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-05-27T07:21:32Z

          add traceback msg from livy return json to InterpreterResult

          commit 2eb6011509b7c4b4ba76b066a9f862143b515e48
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-05-27T07:33:59Z

          add traceback msg from livy return json to InterpreterResult

          commit f6135ccee2dde09ac088fc7f9c20fad7f881b47a
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-05-27T07:44:33Z

          add traceback msg from livy return json to InterpreterResult

          commit 45c5d9f0a3b99b6f4302ed845607e6eca939fdd4
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-05-27T07:47:52Z

          add traceback msg from livy return json to InterpreterResult

          commit 5a03e05f557bb54ef013cefb8ceb9d7c345e7a7a
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-05-27T10:40:18Z

          add check for livy 0.2 when traceback field is missing

          commit 04061d3b3cf3ed6e8ee7af97839752aa722492d7
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-05-31T11:23:43Z

          add debug print

          commit 6a2983f390a0c965345e0b6c1ae1879013ba40cb
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-06-01T02:39:45Z

          fix typo

          commit 3307c6f2b978d0fc30bea132cef15323e69e98f0
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-06-01T06:26:33Z

          add more debug msg

          commit e306d4f58036e3088c1ab4f343f186c4df29304d
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-06-01T06:32:38Z

          add white space after comma

          commit 33100553964d7502ce2143f75762f4c3d39056b0
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-06-01T07:43:55Z

          add try catch to find which string failed ci

          commit f6fc200e81c2d563e6156de036e41b36f87938b0
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-06-01T09:03:41Z

          fix traceback type mismatch

          commit bf26dbed1661d1a1155a9fbb892c8da8c03f857e
          Author: 汪赫扬 <qwemicheal@gmail.com>
          Date: 2017-06-01T09:08:52Z

          whitespace fitting


          githubbot ASF GitHub Bot added a comment - GitHub user qwemicheal opened a pull request: https://github.com/apache/zeppelin/pull/2390 ZEPPELIN-2589 Let zeppelin show more than one line of error log returned by livy. What is this PR for? Let zeppelin show more than one line of error log returned by livy. What type of PR is it? Improvement What is the Jira issue? [ ZEPPELIN-2589 ]( https://issues.apache.org/jira/browse/ZEPPELIN-2589 ) How should this be tested? 1. build: mvn clean package -DskipTests; 2. /bin/zeppelin-daemon.sh restart 3. Start a notebook 4. Use Livy interpreter and input some erroneous spark code, check the shown result is more than one line Screenshots (if appropriate) before ! [screenshot from 2017-06-02 20-29-02] ( https://cloud.githubusercontent.com/assets/14201792/26726496/e5611d9a-47d5-11e7-9dba-6e304cee9b41.png ) after ! [screenshot from 2017-06-02 20-53-03] ( https://cloud.githubusercontent.com/assets/14201792/26726548/14e3fd80-47d6-11e7-8dcb-0ddd21aae2cd.png ) Questions: Does the licenses files need update?No Is there breaking changes for older versions? No Does this needs documentation? No You can merge this pull request into a Git repository by running: $ git pull https://github.com/qwemicheal/zeppelin master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/2390.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 #2390 commit 905c54d7607fd07d25c3369fb1f7cf200c3a2460 Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-05-27T07:21:32Z add traceback msg from livy return json to InterpreterResult commit 2eb6011509b7c4b4ba76b066a9f862143b515e48 Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-05-27T07:33:59Z add traceback msg from livy return json to InterpreterResult commit f6135ccee2dde09ac088fc7f9c20fad7f881b47a Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-05-27T07:44:33Z add traceback msg from livy return json to InterpreterResult commit 45c5d9f0a3b99b6f4302ed845607e6eca939fdd4 Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-05-27T07:47:52Z add traceback msg from livy return json to InterpreterResult commit 5a03e05f557bb54ef013cefb8ceb9d7c345e7a7a Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-05-27T10:40:18Z add check for livy 0.2 when traceback field is missing commit 04061d3b3cf3ed6e8ee7af97839752aa722492d7 Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-05-31T11:23:43Z add debug print commit 6a2983f390a0c965345e0b6c1ae1879013ba40cb Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-06-01T02:39:45Z fix typo commit 3307c6f2b978d0fc30bea132cef15323e69e98f0 Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-06-01T06:26:33Z add more debug msg commit e306d4f58036e3088c1ab4f343f186c4df29304d Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-06-01T06:32:38Z add white space after comma commit 33100553964d7502ce2143f75762f4c3d39056b0 Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-06-01T07:43:55Z add try catch to find which string failed ci commit f6fc200e81c2d563e6156de036e41b36f87938b0 Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-06-01T09:03:41Z fix traceback type mismatch commit bf26dbed1661d1a1155a9fbb892c8da8c03f857e Author: 汪赫扬 <qwemicheal@gmail.com> Date: 2017-06-01T09:08:52Z whitespace fitting
          githubbot ASF GitHub Bot added a comment -

          Github user zjffdu commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          @qwemicheal Thanks for contribution, could you add unit test for this ?

          githubbot ASF GitHub Bot added a comment - Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/2390 @qwemicheal Thanks for contribution, could you add unit test for this ?
          githubbot ASF GitHub Bot added a comment -

          Github user qwemicheal commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          @zjffdu Unit test added.

          githubbot ASF GitHub Bot added a comment - Github user qwemicheal commented on the issue: https://github.com/apache/zeppelin/pull/2390 @zjffdu Unit test added.
          githubbot ASF GitHub Bot added a comment -

          Github user jongyoul commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          @qwemicheal Thanks for the contribution. Can you handle the issues @zjffdu mentioned?

          githubbot ASF GitHub Bot added a comment - Github user jongyoul commented on the issue: https://github.com/apache/zeppelin/pull/2390 @qwemicheal Thanks for the contribution. Can you handle the issues @zjffdu mentioned?
          githubbot ASF GitHub Bot added a comment -

          Github user qwemicheal commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          @zjffdu Unit test merged and the traceback msg concatenated to one string.

          During CI testing, the third one would fail randomly with the following error:

          ParagraphActionsIT.testSingleDynamicFormTextInput:554->AbstractZeppelinIT.waitForParagraph:68->AbstractZeppelinIT.pollingWait:94 » Timeout

          Sometimes, rerun the test or just do some minor syntax change can pass the third CI.
          I have no idea why this would happen. The error message seems to be complaining wait timeout during spark test which had nothing to do with the code I changed.

          githubbot ASF GitHub Bot added a comment - Github user qwemicheal commented on the issue: https://github.com/apache/zeppelin/pull/2390 @zjffdu Unit test merged and the traceback msg concatenated to one string. During CI testing, the third one would fail randomly with the following error: ParagraphActionsIT.testSingleDynamicFormTextInput:554->AbstractZeppelinIT.waitForParagraph:68->AbstractZeppelinIT.pollingWait:94 » Timeout Sometimes, rerun the test or just do some minor syntax change can pass the third CI. I have no idea why this would happen. The error message seems to be complaining wait timeout during spark test which had nothing to do with the code I changed.
          githubbot ASF GitHub Bot added a comment -

          Github user zjffdu commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          @qwemicheal Almost LGTM, just a few minor issues. And could also attach the new screenshot after you fix this ?

          githubbot ASF GitHub Bot added a comment - Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/2390 @qwemicheal Almost LGTM, just a few minor issues. And could also attach the new screenshot after you fix this ?
          githubbot ASF GitHub Bot added a comment -

          Github user qwemicheal commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          Finally pass the CI. @zjffdu I have updated the screen shot and could you share any light on why CI would fail randomly?

          githubbot ASF GitHub Bot added a comment - Github user qwemicheal commented on the issue: https://github.com/apache/zeppelin/pull/2390 Finally pass the CI. @zjffdu I have updated the screen shot and could you share any light on why CI would fail randomly?
          githubbot ASF GitHub Bot added a comment -

          Github user zjffdu commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          Thanks @qwemicheal , What is the failed test you see ? If it is not in the livy component, then it is most likely flaky test.

          githubbot ASF GitHub Bot added a comment - Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/2390 Thanks @qwemicheal , What is the failed test you see ? If it is not in the livy component, then it is most likely flaky test.
          githubbot ASF GitHub Bot added a comment -

          Github user qwemicheal commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          @zjffdu The failure most often happen on the third one of Travis CI , sometimes the second one or ninth one. I have checked the error log multiple times and they all have nothing to do with the Livy code I modified. Most of the time just rerun the failed test can then pass. However, the pass statue won't get updated on PR page so I have to trigger the CI again. Do you have any better way to deal with random failure on CI?

          githubbot ASF GitHub Bot added a comment - Github user qwemicheal commented on the issue: https://github.com/apache/zeppelin/pull/2390 @zjffdu The failure most often happen on the third one of Travis CI , sometimes the second one or ninth one. I have checked the error log multiple times and they all have nothing to do with the Livy code I modified. Most of the time just rerun the failed test can then pass. However, the pass statue won't get updated on PR page so I have to trigger the CI again. Do you have any better way to deal with random failure on CI?
          githubbot ASF GitHub Bot added a comment -

          Github user zjffdu commented on the issue:

          https://github.com/apache/zeppelin/pull/2390

          Thanks @qwemicheal , will merge it if no more comments.

          githubbot ASF GitHub Bot added a comment - Github user zjffdu commented on the issue: https://github.com/apache/zeppelin/pull/2390 Thanks @qwemicheal , will merge it if no more comments.
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/zeppelin/pull/2390

          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/zeppelin/pull/2390
          zjffdu Jeff Zhang added a comment -

          Lee Moon Soo Could you help add heyang wang to contributor list ? Thanks

          zjffdu Jeff Zhang added a comment - Lee Moon Soo Could you help add heyang wang to contributor list ? Thanks

          People

            why heyang wang
            why heyang wang
            Votes:
            0 Vote for this issue
            Watchers:
            Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack