Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0, 0.12.0
    • Component/s: Java Client, JDBC Driver
    • Labels:
      None

      Description

      The main purpose of this issues is to improve JDBC driver to better handle exceptional cases. In detail, this patch will make JDBC driver to throw SQLExceptions with an exact SQLState. Also, I'll add more negative unit tests for JDBC drivers for them.

      1. TAJO-1749.patch
        42 kB
        Hyunsik Choi

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user hyunsik opened a pull request:

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

          TAJO-1749: Refine JDBC exceptions to better handle exceptional cases.

          See https://issues.apache.org/jira/browse/TAJO-1749.

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

          $ git pull https://github.com/hyunsik/tajo TAJO-1749

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

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


          commit 9ead189293d673aebd57268b681a5f76b973f6ee
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-09-03T02:56:47Z

          initial work for TAJO-1749.

          commit 44f491c7b89e095e39bc48de8b7c85b20c89a685
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-09-03T02:56:58Z

          Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into TAJO-1749

          commit bb5379a7cdff5c9f6318234b83cbc342c4688a1c
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-09-03T08:46:29Z

          Add unit tests for exceptional cases and message, and SQLState map.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user hyunsik opened a pull request: https://github.com/apache/tajo/pull/722 TAJO-1749 : Refine JDBC exceptions to better handle exceptional cases. See https://issues.apache.org/jira/browse/TAJO-1749 . You can merge this pull request into a Git repository by running: $ git pull https://github.com/hyunsik/tajo TAJO-1749 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/722.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 #722 commit 9ead189293d673aebd57268b681a5f76b973f6ee Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-09-03T02:56:47Z initial work for TAJO-1749 . commit 44f491c7b89e095e39bc48de8b7c85b20c89a685 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-09-03T02:56:58Z Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into TAJO-1749 commit bb5379a7cdff5c9f6318234b83cbc342c4688a1c Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-09-03T08:46:29Z Add unit tests for exceptional cases and message, and SQLState map.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik commented on the pull request:

          https://github.com/apache/tajo/pull/722#issuecomment-137412336

          Its unit test has been passed.
          https://travis-ci.org/apache/tajo/builds/78539223

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/722#issuecomment-137412336 Its unit test has been passed. https://travis-ci.org/apache/tajo/builds/78539223
          Hide
          tajoqa Tajo QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12753939/TAJO-1749.patch
          against master revision release-0.9.0-rc0-437-g22ab1cf.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 2 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

          +1 checkstyle. The patch generated 0 code style errors.

          -1 findbugs. The patch appears to cause Findbugs (version 2.0.3) to fail.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in tajo-client tajo-common tajo-core tajo-jdbc tajo-rpc/tajo-rpc-protobuf.

          Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/846//testReport/
          Findbugs results: https://builds.apache.org/job/PreCommit-TAJO-Build/846//findbugsResult
          Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/846//console

          This message is automatically generated.

          Show
          tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12753939/TAJO-1749.patch against master revision release-0.9.0-rc0-437-g22ab1cf. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 2 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to cause Findbugs (version 2.0.3) to fail. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-client tajo-common tajo-core tajo-jdbc tajo-rpc/tajo-rpc-protobuf. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/846//testReport/ Findbugs results: https://builds.apache.org/job/PreCommit-TAJO-Build/846//findbugsResult Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/846//console This message is automatically generated.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/722#discussion_r38642156

          — Diff: tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java —
          @@ -22,6 +22,7 @@
          import org.apache.tajo.error.Errors.ResultCode;
          import org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState;

          +import javax.xml.transform.Result;
          — End diff –

          remove unused import before you commit

          Show
          githubbot ASF GitHub Bot added a comment - Github user jinossy commented on a diff in the pull request: https://github.com/apache/tajo/pull/722#discussion_r38642156 — Diff: tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java — @@ -22,6 +22,7 @@ import org.apache.tajo.error.Errors.ResultCode; import org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.ReturnState; +import javax.xml.transform.Result; — End diff – remove unused import before you commit
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jinossy commented on the pull request:

          https://github.com/apache/tajo/pull/722#issuecomment-137431532

          +1 Looks great to me!

          Show
          githubbot ASF GitHub Bot added a comment - Github user jinossy commented on the pull request: https://github.com/apache/tajo/pull/722#issuecomment-137431532 +1 Looks great to me!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/722
          Hide
          hyunsik Hyunsik Choi added a comment -

          I just committed this patch to 0.11.0 and master branch. Thank you for the reviews.

          Show
          hyunsik Hyunsik Choi added a comment - I just committed this patch to 0.11.0 and master branch. Thank you for the reviews.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Tajo-master-CODEGEN-build #474 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/474/)
          TAJO-1749: Refine JDBC exceptions to better handle exceptional cases. (hyunsik: rev 688bc5c1111054cb486cdc915edc8fc0097add4a)

          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoPreparedStatement.java
          • tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java
          • CHANGES
          • tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
          • tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbcNegative.java
          • tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java
          • tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java
          • tajo-common/src/main/proto/errors.proto
          • tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/NettyClientBase.java
          • tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java
          • tajo-client/src/main/java/org/apache/tajo/jdbc/TajoSQLException.java
          • tajo-client/src/main/java/org/apache/tajo/jdbc/WaitingResultSet.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #474 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/474/ ) TAJO-1749 : Refine JDBC exceptions to better handle exceptional cases. (hyunsik: rev 688bc5c1111054cb486cdc915edc8fc0097add4a) tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoPreparedStatement.java tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java CHANGES tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbcNegative.java tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java tajo-common/src/main/proto/errors.proto tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/NettyClientBase.java tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java tajo-client/src/main/java/org/apache/tajo/jdbc/TajoSQLException.java tajo-client/src/main/java/org/apache/tajo/jdbc/WaitingResultSet.java tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Tajo-0.11.0-build #9 (See https://builds.apache.org/job/Tajo-0.11.0-build/9/)
          TAJO-1749: Refine JDBC exceptions to better handle exceptional cases. (hyunsik: rev 6c0f771d9f69a85e3cedf7d34d4e9cc69c3373af)

          • tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java
          • tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/NettyClientBase.java
          • tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java
          • tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbcNegative.java
          • tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoPreparedStatement.java
          • tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
          • tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java
          • tajo-common/src/main/proto/errors.proto
          • tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
          • tajo-client/src/main/java/org/apache/tajo/jdbc/TajoSQLException.java
          • CHANGES
          • tajo-client/src/main/java/org/apache/tajo/jdbc/WaitingResultSet.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.11.0-build #9 (See https://builds.apache.org/job/Tajo-0.11.0-build/9/ ) TAJO-1749 : Refine JDBC exceptions to better handle exceptional cases. (hyunsik: rev 6c0f771d9f69a85e3cedf7d34d4e9cc69c3373af) tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/NettyClientBase.java tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbcNegative.java tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoPreparedStatement.java tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java tajo-common/src/main/proto/errors.proto tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java tajo-client/src/main/java/org/apache/tajo/jdbc/TajoSQLException.java CHANGES tajo-client/src/main/java/org/apache/tajo/jdbc/WaitingResultSet.java
          Hide
          hudson Hudson added a comment -

          ABORTED: Integrated in Tajo-master-build #830 (See https://builds.apache.org/job/Tajo-master-build/830/)
          TAJO-1749: Refine JDBC exceptions to better handle exceptional cases. (hyunsik: rev 688bc5c1111054cb486cdc915edc8fc0097add4a)

          • tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/NettyClientBase.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java
          • tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java
          • tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java
          • tajo-client/src/main/java/org/apache/tajo/jdbc/TajoSQLException.java
          • tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java
          • tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java
          • tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbcNegative.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
          • tajo-client/src/main/java/org/apache/tajo/jdbc/WaitingResultSet.java
          • tajo-common/src/main/proto/errors.proto
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoPreparedStatement.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java
          • tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java
          • CHANGES
          Show
          hudson Hudson added a comment - ABORTED: Integrated in Tajo-master-build #830 (See https://builds.apache.org/job/Tajo-master-build/830/ ) TAJO-1749 : Refine JDBC exceptions to better handle exceptional cases. (hyunsik: rev 688bc5c1111054cb486cdc915edc8fc0097add4a) tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/NettyClientBase.java tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java tajo-client/src/main/java/org/apache/tajo/jdbc/TajoSQLException.java tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java tajo-jdbc/src/test/java/org/apache/tajo/jdbc/TestTajoJdbcNegative.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java tajo-client/src/main/java/org/apache/tajo/jdbc/WaitingResultSet.java tajo-common/src/main/proto/errors.proto tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoPreparedStatement.java tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java CHANGES

            People

            • Assignee:
              hyunsik Hyunsik Choi
              Reporter:
              hyunsik Hyunsik Choi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development