Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1165

Needs to show error messages on query_executor.jsp

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Web UI
    • Labels:
      None

      Description

      When errors occur on query_executor web page, it does not display any error messages. Also, when try to re-submit a query, it shows "Already query running" message and does not execute query at all.

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user ykrips opened a pull request:

        https://github.com/apache/tajo/pull/238

        TAJO-1165: Needs to show error messages on query_executor.jsp

        Added error handling codes on QueryExecutorServlet.

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

        $ git pull https://github.com/ykrips/tajo TAJO-1165

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

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


        commit a9f21c4c0a874ad336a325a5794515196ef1711e
        Author: Jihun Kang <ykrips@gmail.com>
        Date: 2014-11-12T05:30:43Z

        TAJO-1165: Needs to show error messages on query_executor.jsp


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user ykrips opened a pull request: https://github.com/apache/tajo/pull/238 TAJO-1165 : Needs to show error messages on query_executor.jsp Added error handling codes on QueryExecutorServlet. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ykrips/tajo TAJO-1165 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/238.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 #238 commit a9f21c4c0a874ad336a325a5794515196ef1711e Author: Jihun Kang <ykrips@gmail.com> Date: 2014-11-12T05:30:43Z TAJO-1165 : Needs to show error messages on query_executor.jsp
        Hide
        githubbot ASF GitHub Bot added a comment -

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

        https://github.com/apache/tajo/pull/238#discussion_r20559308

        — Diff: tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java —
        @@ -300,6 +300,19 @@ public void run()

        { progress.set(100); }

        + } else if (response.getResultCode() == ClientProtos.ResultCode.ERROR) {
        + if (response.hasErrorMessage()) {
        + StringBuffer errorMessage = new StringBuffer(response.getErrorMessage());
        + String modifiedMessage;
        +
        + if (errorMessage.length() > 200)

        { + modifiedMessage = errorMessage.substring(0, 200); + }

        else

        { + modifiedMessage = errorMessage.toString(); + }

        +
        + error = new Exception(modifiedMessage);
        — End diff –

        How about replace all "\n" of modifiedMessage to "<br/>"?

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on a diff in the pull request: https://github.com/apache/tajo/pull/238#discussion_r20559308 — Diff: tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java — @@ -300,6 +300,19 @@ public void run() { progress.set(100); } + } else if (response.getResultCode() == ClientProtos.ResultCode.ERROR) { + if (response.hasErrorMessage()) { + StringBuffer errorMessage = new StringBuffer(response.getErrorMessage()); + String modifiedMessage; + + if (errorMessage.length() > 200) { + modifiedMessage = errorMessage.substring(0, 200); + } else { + modifiedMessage = errorMessage.toString(); + } + + error = new Exception(modifiedMessage); — End diff – How about replace all "\n" of modifiedMessage to "<br/>"?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/238#issuecomment-63597543

        I have one more suggestion. If you possible, could you replace current javascript alert message to "Query execution failed" at query_executor.jsp?

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/238#issuecomment-63597543 I have one more suggestion. If you possible, could you replace current javascript alert message to "Query execution failed" at query_executor.jsp?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user ykrips commented on the pull request:

        https://github.com/apache/tajo/pull/238#issuecomment-63766883

        That's great. Your suggestion would give better user experience on web gui. I will commit it in a short time.

        Show
        githubbot ASF GitHub Bot added a comment - Github user ykrips commented on the pull request: https://github.com/apache/tajo/pull/238#issuecomment-63766883 That's great. Your suggestion would give better user experience on web gui. I will commit it in a short time.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/238#issuecomment-64300349

        +1

        Thanks @ykrips .
        I've just found that it worked on my testing cluster.
        I'm going to push it to the master branch for now.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/238#issuecomment-64300349 +1 Thanks @ykrips . I've just found that it worked on my testing cluster. I'm going to push it to the master branch for now.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/238#issuecomment-64318014

        Hi @ykrips

        Could you close this issue?

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/238#issuecomment-64318014 Hi @ykrips Could you close this issue?
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user ykrips closed the pull request at:

        https://github.com/apache/tajo/pull/238

        Show
        githubbot ASF GitHub Bot added a comment - Github user ykrips closed the pull request at: https://github.com/apache/tajo/pull/238
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #468 (See https://builds.apache.org/job/Tajo-master-build/468/)
        TAJO-1165: Needs to show error messages on query_executor.jsp. (Jihun Kang via jaehwa) (blrunner: rev 4637f7fd126c46f0e6a4bcdf2d816511b690552b)

        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java
        • tajo-core/src/main/resources/webapps/admin/query_executor.jsp
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #468 (See https://builds.apache.org/job/Tajo-master-build/468/ ) TAJO-1165 : Needs to show error messages on query_executor.jsp. (Jihun Kang via jaehwa) (blrunner: rev 4637f7fd126c46f0e6a4bcdf2d816511b690552b) CHANGES tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java tajo-core/src/main/resources/webapps/admin/query_executor.jsp
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #110 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/110/)
        TAJO-1165: Needs to show error messages on query_executor.jsp. (Jihun Kang via jaehwa) (blrunner: rev 4637f7fd126c46f0e6a4bcdf2d816511b690552b)

        • tajo-core/src/main/resources/webapps/admin/query_executor.jsp
        • tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java
        • CHANGES
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #110 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/110/ ) TAJO-1165 : Needs to show error messages on query_executor.jsp. (Jihun Kang via jaehwa) (blrunner: rev 4637f7fd126c46f0e6a4bcdf2d816511b690552b) tajo-core/src/main/resources/webapps/admin/query_executor.jsp tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java CHANGES

          People

          • Assignee:
            ykrips Jihun Kang
            Reporter:
            ykrips Jihun Kang
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development