Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: Java Client
    • Labels:
      None

      Description

      I propose Tajo Java Client version 2. Its motivations are as follows:

      • After TAJO-1625, the error propagation has been changed significantly. Java Client should make use the new error propagation system. Java Client should throw the proper exceptions.
      • Many Java API exposes internal data structure and protocol buffer data structure. It requires users to understand its internal behavior and architecture. We should hide them from users.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user hyunsik opened a pull request:

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

          TAJO-1699: Tajo Java Client version 2.

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

          $ git pull https://github.com/hyunsik/tajo CLIENT_v2

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

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


          commit 4597561198cf1d55fcd39cb76fc142facb0e9d34
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-27T16:23:28Z

          Add initial design for client API v2.

          commit 3223dc68433822e16a5f1624f4474b543afacb58
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-28T07:39:28Z

          Complete initial version for client API v2.

          commit 1bea9f7052dd1650e8e9679c32113042a4a37dfb
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-28T07:53:15Z

          Add testExecuteUpdate test.

          commit 79e2a5ba59123c1e76ae7b614ac9730937a40c86
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-28T16:00:43Z

          Add unit tests for 3 types SQL execution through client v2.

          commit 54365db55dafc123d9aefab27da63b2bf2cba589
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-29T02:12:10Z

          Changed lots of SQLException to TajoException and implement ClientExceptionUtil.

          commit 8c450111014c2ac44d719de963d31bef7d337d11
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-29T02:12:41Z

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

          commit 1c07bf984ad2c6b359b83dea3b5201f8b8a6418b
          Author: Hyunsik Choi <hyunsik@apache.org>
          Date: 2015-07-29T05:54:58Z

          Add listener and refactored exceptions's constructor to take ReturnState.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user hyunsik opened a pull request: https://github.com/apache/tajo/pull/662 TAJO-1699 : Tajo Java Client version 2. You can merge this pull request into a Git repository by running: $ git pull https://github.com/hyunsik/tajo CLIENT_v2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/662.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 #662 commit 4597561198cf1d55fcd39cb76fc142facb0e9d34 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-27T16:23:28Z Add initial design for client API v2. commit 3223dc68433822e16a5f1624f4474b543afacb58 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-28T07:39:28Z Complete initial version for client API v2. commit 1bea9f7052dd1650e8e9679c32113042a4a37dfb Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-28T07:53:15Z Add testExecuteUpdate test. commit 79e2a5ba59123c1e76ae7b614ac9730937a40c86 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-28T16:00:43Z Add unit tests for 3 types SQL execution through client v2. commit 54365db55dafc123d9aefab27da63b2bf2cba589 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-29T02:12:10Z Changed lots of SQLException to TajoException and implement ClientExceptionUtil. commit 8c450111014c2ac44d719de963d31bef7d337d11 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-29T02:12:41Z Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into CLIENT_v2 commit 1c07bf984ad2c6b359b83dea3b5201f8b8a6418b Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-07-29T05:54:58Z Add listener and refactored exceptions's constructor to take ReturnState.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik commented on the pull request:

          https://github.com/apache/tajo/pull/662#issuecomment-125851824

          This work is highly related to the error propagation work. So, it also refactors error and exception related codes.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/662#issuecomment-125851824 This work is highly related to the error propagation work. So, it also refactors error and exception related codes.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik commented on the pull request:

          https://github.com/apache/tajo/pull/662#issuecomment-125873608

          rebased and fixed some unit tests.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/662#issuecomment-125873608 rebased and fixed some unit tests.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik commented on the pull request:

          https://github.com/apache/tajo/pull/662#issuecomment-125879189

          It is ready to be reviewed.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/662#issuecomment-125879189 It is ready to be reviewed.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35946742

          — Diff: tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java —
          @@ -27,6 +28,16 @@
          public class TajoException extends Exception implements TajoExceptionInterface {
          private ResultCode code;

          + public TajoException(ReturnState e) {
          — End diff –

          ```ReturnState``` contains stack trace as well as return code and message, but the stack trace is missed here.
          Would you give some backgrounds for this?

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35946742 — Diff: tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java — @@ -27,6 +28,16 @@ public class TajoException extends Exception implements TajoExceptionInterface { private ResultCode code; + public TajoException(ReturnState e) { — End diff – ```ReturnState``` contains stack trace as well as return code and message, but the stack trace is missed here. Would you give some backgrounds for this?
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35947774

          — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java —
          @@ -91,7 +91,7 @@ public String getSystemDatabaseName()

          { return systemTableNames; }
          • private TableDescriptor getTableDescriptor(String tableName) {
            + private TableDescriptor getTableDescriptor(String tableName) throws UndefinedTableException {
              • End diff –

          I know you just modified the function signature to throw an exception. However, I found a problem that this function returns null instead of throwing UndefinedTableException when the table of the given name is not found.
          Would you also check it please?

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35947774 — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java — @@ -91,7 +91,7 @@ public String getSystemDatabaseName() { return systemTableNames; } private TableDescriptor getTableDescriptor(String tableName) { + private TableDescriptor getTableDescriptor(String tableName) throws UndefinedTableException { End diff – I know you just modified the function signature to throw an exception. However, I found a problem that this function returns null instead of throwing UndefinedTableException when the table of the given name is not found. Would you also check it please?
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35948192

          — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java —
          @@ -110,7 +110,7 @@ private TableDescriptor getTableDescriptor(String tableName)

          { return tableDescriptor; }
          • public CatalogProtos.TableDescProto getTableDesc(String tableName) {
            + public CatalogProtos.TableDescProto getTableDesc(String tableName) throws UndefinedTableException {
              • End diff –

          Both ```getTableDesc()``` and ```existTable()``` internally use ```getTableDescriptor()```, so seem to be changed according to the implementation of ```getTableDescriptor()```. Please consider the above comment.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35948192 — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java — @@ -110,7 +110,7 @@ private TableDescriptor getTableDescriptor(String tableName) { return tableDescriptor; } public CatalogProtos.TableDescProto getTableDesc(String tableName) { + public CatalogProtos.TableDescProto getTableDesc(String tableName) throws UndefinedTableException { End diff – Both ```getTableDesc()``` and ```existTable()``` internally use ```getTableDescriptor()```, so seem to be changed according to the implementation of ```getTableDescriptor()```. Please consider the above comment.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35948986

          — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java —
          @@ -179,7 +179,7 @@ public AbstractDBStore(Configuration conf) throws InternalException {
          }
          }
          }

          • } catch (Exception se) { + }

            catch (Throwable se) {

              • End diff –

          Looks good, but ```Throwable``` occurred while dropping base tables is consumed at Line 175. Please fix this too.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35948986 — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java — @@ -179,7 +179,7 @@ public AbstractDBStore(Configuration conf) throws InternalException { } } } } catch (Exception se) { + } catch (Throwable se) { End diff – Looks good, but ```Throwable``` occurred while dropping base tables is consumed at Line 175. Please fix this too.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35949195

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java —
          @@ -133,9 +135,10 @@ TableDesc createExternalTable(final String tableName, final Schema schema, final

          • @return Table description
          • @throws java.sql.SQLException
            */
          • TableDesc getTableDesc(final String tableName) throws SQLException;
            + TableDesc getTableDesc(final String tableName) throws UndefinedTableException;
          • List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName) throws SQLException;
            + List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName)
            + throws AmbiguousFunctionException, UndefinedFunctionException;
              • End diff –

          It would be better if ```getFunctions``` returns an empty list rather than throwing an ```UndefinedFunctionException``` when there is no function of the given name.
          In addition, this method should return a list of the functions of the given name. So, ```AmbiguousFunctionException``` is inappropriate.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35949195 — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java — @@ -133,9 +135,10 @@ TableDesc createExternalTable(final String tableName, final Schema schema, final @return Table description @throws java.sql.SQLException */ TableDesc getTableDesc(final String tableName) throws SQLException; + TableDesc getTableDesc(final String tableName) throws UndefinedTableException; List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName) throws SQLException; + List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName) + throws AmbiguousFunctionException, UndefinedFunctionException; End diff – It would be better if ```getFunctions``` returns an empty list rather than throwing an ```UndefinedFunctionException``` when there is no function of the given name. In addition, this method should return a list of the functions of the given name. So, ```AmbiguousFunctionException``` is inappropriate.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35949692

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java —
          @@ -200,12 +231,17 @@ public TableDesc getTableDesc(final String tableName) throws SQLException

          { throw new RuntimeException(e); }
          • throwIfError(res.getState());
            + if (isThisError(res.getState(), Errors.ResultCode.UNDEFINED_TABLE)) { + throw new UndefinedTableException(res.getState()); + }

            +
            + ensureOk(res.getState());
            return CatalogUtil.newTableDesc(res.getTable());
            }

          @Override

          • public List<FunctionDescProto> getFunctions(final String functionName) throws SQLException {
            + public List<FunctionDescProto> getFunctions(final String functionName)
            + throws AmbiguousFunctionException, UndefinedFunctionException {
              • End diff –

          As I commented above, it would be better if ```getFunctions``` returns an empty list rather than throwing an ```UndefinedFunctionException``` when there is no function of the given name.
          In addition, this method should return a list of the functions of the given name. So, ```AmbiguousFunctionException``` is inappropriate.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35949692 — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java — @@ -200,12 +231,17 @@ public TableDesc getTableDesc(final String tableName) throws SQLException { throw new RuntimeException(e); } throwIfError(res.getState()); + if (isThisError(res.getState(), Errors.ResultCode.UNDEFINED_TABLE)) { + throw new UndefinedTableException(res.getState()); + } + + ensureOk(res.getState()); return CatalogUtil.newTableDesc(res.getTable()); } @Override public List<FunctionDescProto> getFunctions(final String functionName) throws SQLException { + public List<FunctionDescProto> getFunctions(final String functionName) + throws AmbiguousFunctionException, UndefinedFunctionException { End diff – As I commented above, it would be better if ```getFunctions``` returns an empty list rather than throwing an ```UndefinedFunctionException``` when there is no function of the given name. In addition, this method should return a list of the functions of the given name. So, ```AmbiguousFunctionException``` is inappropriate.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35950534

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/DummyServiceTracker.java —
          @@ -19,6 +19,7 @@
          package org.apache.tajo.client;

          import org.apache.tajo.conf.TajoConf;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove the unused import.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35950534 — Diff: tajo-client/src/main/java/org/apache/tajo/client/DummyServiceTracker.java — @@ -19,6 +19,7 @@ package org.apache.tajo.client; import org.apache.tajo.conf.TajoConf; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove the unused import.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35950685

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java —
          @@ -21,6 +21,9 @@
          import com.google.protobuf.ServiceException;
          — End diff –

          There are some unused imports. Please remove them.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35950685 — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java — @@ -21,6 +21,9 @@ import com.google.protobuf.ServiceException; — End diff – There are some unused imports. Please remove them.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35951781

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java —
          @@ -94,11 +97,11 @@
          *

          • @return If failed, return null.
            */
          • ResultSet executeQueryAndGetResult(final String sql) throws SQLException;
            + ResultSet executeQueryAndGetResult(final String sql) throws TajoException;
              • End diff –

          It is difficult to find the reason why ```executeQueryAndGetResult()``` throws ```TajoException```, but ```executeQuery()``` does not. Would you give some backgrounds?

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35951781 — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java — @@ -94,11 +97,11 @@ * @return If failed, return null. */ ResultSet executeQueryAndGetResult(final String sql) throws SQLException; + ResultSet executeQueryAndGetResult(final String sql) throws TajoException; End diff – It is difficult to find the reason why ```executeQueryAndGetResult()``` throws ```TajoException```, but ```executeQuery()``` does not. Would you give some backgrounds?
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35951917

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java —
          @@ -108,17 +111,17 @@

          TajoMemoryResultSet fetchNextQueryResult(final QueryId queryId, final int fetchRowNum) throws SQLException;

          • boolean updateQuery(final String sql) throws SQLException;
            + boolean updateQuery(final String sql) throws TajoException;
          • boolean updateQueryWithJson(final String json) throws SQLException;
            + boolean updateQueryWithJson(final String json) throws TajoException;

          List<ClientProtos.BriefQueryInfo> getRunningQueryList() throws SQLException;
          — End diff –

          Some of other methods in this class still throw ```SQLException```. Is it good or do you leave them for future changes?

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35951917 — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java — @@ -108,17 +111,17 @@ TajoMemoryResultSet fetchNextQueryResult(final QueryId queryId, final int fetchRowNum) throws SQLException; boolean updateQuery(final String sql) throws SQLException; + boolean updateQuery(final String sql) throws TajoException; boolean updateQueryWithJson(final String json) throws SQLException; + boolean updateQueryWithJson(final String json) throws TajoException; List<ClientProtos.BriefQueryInfo> getRunningQueryList() throws SQLException; — End diff – Some of other methods in this class still throw ```SQLException```. Is it good or do you leave them for future changes?
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35952051

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/ResultSetUtil.java —
          @@ -19,6 +19,8 @@
          package org.apache.tajo.client;

          import org.apache.tajo.common.TajoDataTypes;
          +import org.apache.tajo.exception.TajoInternalError;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35952051 — Diff: tajo-client/src/main/java/org/apache/tajo/client/ResultSetUtil.java — @@ -19,6 +19,8 @@ package org.apache.tajo.client; import org.apache.tajo.common.TajoDataTypes; +import org.apache.tajo.exception.TajoInternalError; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35952528

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java —
          @@ -0,0 +1,42 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.annotation.Nullable;
          +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException;
          +
          +import java.util.Map;
          +
          +public class ClientDeligateFactory {
          — End diff –

          Please fix typo.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35952528 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java — @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.annotation.Nullable; +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException; + +import java.util.Map; + +public class ClientDeligateFactory { — End diff – Please fix typo.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35952534

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java —
          @@ -0,0 +1,42 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.annotation.Nullable;
          +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException;
          +
          +import java.util.Map;
          +
          +public class ClientDeligateFactory {
          +
          + public static ClientDelegate newDefaultDeligate(String host,
          — End diff –

          Please fix typo.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35952534 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java — @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.annotation.Nullable; +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException; + +import java.util.Map; + +public class ClientDeligateFactory { + + public static ClientDelegate newDefaultDeligate(String host, — End diff – Please fix typo.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35952542

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java —
          @@ -0,0 +1,42 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.annotation.Nullable;
          +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException;
          +
          +import java.util.Map;
          +
          +public class ClientDeligateFactory {
          +
          + public static ClientDelegate newDefaultDeligate(String host,
          + int port,
          + @Nullable Map<String, String> props)
          + throws ClientUnableToConnectException

          { + + return new LegacyClientDelegate(host, port, props); + }

          +
          + public static ClientDelegate newDefaultDeligate(ServiceDiscovery discovery,
          — End diff –

          Please fix typo.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35952542 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java — @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.annotation.Nullable; +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException; + +import java.util.Map; + +public class ClientDeligateFactory { + + public static ClientDelegate newDefaultDeligate(String host, + int port, + @Nullable Map<String, String> props) + throws ClientUnableToConnectException { + + return new LegacyClientDelegate(host, port, props); + } + + public static ClientDelegate newDefaultDeligate(ServiceDiscovery discovery, — End diff – Please fix typo.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35952656

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java —
          @@ -0,0 +1,30 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +public class ClientUtil {
          +
          + public static boolean isOk(QueryState state) {
          — End diff –

          Would you write some descriptions for these methods? It is difficult to guess its behaviour.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35952656 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java — @@ -0,0 +1,30 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +public class ClientUtil { + + public static boolean isOk(QueryState state) { — End diff – Would you write some descriptions for these methods? It is difficult to guess its behaviour.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35952857

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java —
          @@ -0,0 +1,125 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.auth.UserRoleInfo;
          +
          +import java.sql.ResultSet;
          +import java.util.concurrent.Future;
          +
          +public interface QueryFuture extends Future<ResultSet> {
          + /**
          + * Get a query id
          + *
          + * @return query id
          + */
          + String id();
          +
          + String queue();
          — End diff –

          Please add a description for this method.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35952857 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java — @@ -0,0 +1,125 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.auth.UserRoleInfo; + +import java.sql.ResultSet; +import java.util.concurrent.Future; + +public interface QueryFuture extends Future<ResultSet> { + /** + * Get a query id + * + * @return query id + */ + String id(); + + String queue(); — End diff – Please add a description for this method.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35953000

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java —
          @@ -0,0 +1,25 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import java.net.InetSocketAddress;
          +
          +public interface ServiceDiscovery {
          — End diff –

          Please add a description for this interface.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35953000 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java — @@ -0,0 +1,25 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import java.net.InetSocketAddress; + +public interface ServiceDiscovery { — End diff – Please add a description for this interface.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35953155

          — Diff: tajo-common/src/main/java/org/apache/tajo/exception/ExceptionUtil.java —
          @@ -21,6 +21,11 @@
          import org.apache.commons.logging.Log;
          import org.apache.hadoop.util.StringUtils;
          import org.apache.tajo.common.TajoDataTypes.DataType;
          +import org.apache.tajo.rpc.protocolrecords.PrimitiveProtos;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35953155 — Diff: tajo-common/src/main/java/org/apache/tajo/exception/ExceptionUtil.java — @@ -21,6 +21,11 @@ import org.apache.commons.logging.Log; import org.apache.hadoop.util.StringUtils; import org.apache.tajo.common.TajoDataTypes.DataType; +import org.apache.tajo.rpc.protocolrecords.PrimitiveProtos; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968081

          — Diff: tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java —
          @@ -0,0 +1,236 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import com.facebook.presto.hive.shaded.com.google.common.collect.Lists;
          +import org.apache.tajo.QueryTestCaseBase;
          +import org.apache.tajo.catalog.exception.DuplicateDatabaseException;
          +import org.apache.tajo.catalog.exception.UndefinedDatabaseException;
          +import org.apache.tajo.catalog.exception.UndefinedTableException;
          +import org.apache.tajo.exception.TajoException;
          +import org.apache.tajo.service.ServiceTracker;
          +import org.apache.tajo.service.ServiceTrackerFactory;
          +import org.junit.AfterClass;
          +import org.junit.BeforeClass;
          +import org.junit.Test;
          +
          +import java.io.IOException;
          +import java.net.InetSocketAddress;
          +import java.sql.ResultSet;
          +import java.sql.SQLException;
          +import java.util.List;
          +import java.util.concurrent.ExecutionException;
          +import java.util.concurrent.atomic.AtomicBoolean;
          +
          +import static org.junit.Assert.*;
          +
          +public class TestTajoClientV2 extends QueryTestCaseBase {
          + private static TajoClient clientv2;
          +
          + @BeforeClass
          + public static void setUp() throws Exception {
          + conf = testingCluster.getConfiguration();
          +
          + clientv2 = new TajoClient(new ServiceDiscovery() {
          + ServiceTracker tracker = ServiceTrackerFactory.get(conf);
          + @Override
          + public InetSocketAddress clientAddress()

          { + return tracker.getClientServiceAddress(); + }

          + });
          + }
          +
          + @AfterClass
          + public static void tearDown() throws Exception

          { + clientv2.close(); + }

          +
          + @Test
          + public void testExecuteUpdate() throws TajoException {
          + clientv2.executeUpdate("create database tajoclientv2");
          + clientv2.selectDB("tajoclientv2");
          + clientv2.selectDB("default");
          + clientv2.executeUpdate("drop database tajoclientv2");
          +
          + try

          { + clientv2.selectDB("tajoclientv2"); + fail(); + }

          catch (UndefinedDatabaseException e) {
          — End diff –

          Don't we have to check other types of exceptions?
          It seems that any exceptions except ```UndefinedDatabaseException``` are not allowed here.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968081 — Diff: tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java — @@ -0,0 +1,236 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import com.facebook.presto.hive.shaded.com.google.common.collect.Lists; +import org.apache.tajo.QueryTestCaseBase; +import org.apache.tajo.catalog.exception.DuplicateDatabaseException; +import org.apache.tajo.catalog.exception.UndefinedDatabaseException; +import org.apache.tajo.catalog.exception.UndefinedTableException; +import org.apache.tajo.exception.TajoException; +import org.apache.tajo.service.ServiceTracker; +import org.apache.tajo.service.ServiceTrackerFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.IOException; +import java.net.InetSocketAddress; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.atomic.AtomicBoolean; + +import static org.junit.Assert.*; + +public class TestTajoClientV2 extends QueryTestCaseBase { + private static TajoClient clientv2; + + @BeforeClass + public static void setUp() throws Exception { + conf = testingCluster.getConfiguration(); + + clientv2 = new TajoClient(new ServiceDiscovery() { + ServiceTracker tracker = ServiceTrackerFactory.get(conf); + @Override + public InetSocketAddress clientAddress() { + return tracker.getClientServiceAddress(); + } + }); + } + + @AfterClass + public static void tearDown() throws Exception { + clientv2.close(); + } + + @Test + public void testExecuteUpdate() throws TajoException { + clientv2.executeUpdate("create database tajoclientv2"); + clientv2.selectDB("tajoclientv2"); + clientv2.selectDB("default"); + clientv2.executeUpdate("drop database tajoclientv2"); + + try { + clientv2.selectDB("tajoclientv2"); + fail(); + } catch (UndefinedDatabaseException e) { — End diff – Don't we have to check other types of exceptions? It seems that any exceptions except ```UndefinedDatabaseException``` are not allowed here.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968450

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java —
          @@ -0,0 +1,125 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.auth.UserRoleInfo;
          +
          +import java.sql.ResultSet;
          +import java.util.concurrent.Future;
          +
          +public interface QueryFuture extends Future<ResultSet> {
          + /**
          + * Get a query id
          + *
          + * @return query id
          + */
          + String id();
          +
          + String queue();
          +
          + /**
          + * Get a query state
          + *
          + * @return query state
          + */
          + QueryState state();
          +
          + /**
          + * Get a normalized progress (0 ~ 1.0f) of a query running
          + *
          + * @return progress
          + */
          + float progress();
          +
          + /**
          + * A submitted or running query state is normal
          + *
          + * @return True if a query state is normal
          + */
          + boolean isOk();
          +
          + /**
          + * Get whether the query is successfully completed or not.
          + *
          + * @return True if the query is successfully completed.
          + */
          + boolean isCompleted();
          — End diff –

          For me, ```query is completed``` sounds that query execution is completed whether it is succeeded, failed or killed.
          How about changing ```isSucceeded()```? IMHO, it looks more intuitive.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968450 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java — @@ -0,0 +1,125 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.auth.UserRoleInfo; + +import java.sql.ResultSet; +import java.util.concurrent.Future; + +public interface QueryFuture extends Future<ResultSet> { + /** + * Get a query id + * + * @return query id + */ + String id(); + + String queue(); + + /** + * Get a query state + * + * @return query state + */ + QueryState state(); + + /** + * Get a normalized progress (0 ~ 1.0f) of a query running + * + * @return progress + */ + float progress(); + + /** + * A submitted or running query state is normal + * + * @return True if a query state is normal + */ + boolean isOk(); + + /** + * Get whether the query is successfully completed or not. + * + * @return True if the query is successfully completed. + */ + boolean isCompleted(); — End diff – For me, ```query is completed``` sounds that query execution is completed whether it is succeeded, failed or killed. How about changing ```isSucceeded()```? IMHO, it looks more intuitive.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968629

          — Diff: tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java —
          @@ -38,7 +39,7 @@
          public class TestSQLExpression extends ExprTestBase {

          @Test

          • public void testQuotedIdentifiers() throws IOException {
            + public void testQuotedIdentifiers() throws Throwable {
              • End diff –

          It seems to be enough with ```TajoException``` rather than ```Throwable```.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968629 — Diff: tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java — @@ -38,7 +39,7 @@ public class TestSQLExpression extends ExprTestBase { @Test public void testQuotedIdentifiers() throws IOException { + public void testQuotedIdentifiers() throws Throwable { End diff – It seems to be enough with ```TajoException``` rather than ```Throwable```.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968692

          — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/AggFunctionInvoke.java —
          @@ -23,6 +23,8 @@
          import org.apache.tajo.common.TajoDataTypes;
          import org.apache.tajo.datum.Datum;
          import org.apache.tajo.exception.InternalException;
          +import org.apache.tajo.exception.TajoInternalError;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968692 — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/AggFunctionInvoke.java — @@ -23,6 +23,8 @@ import org.apache.tajo.common.TajoDataTypes; import org.apache.tajo.datum.Datum; import org.apache.tajo.exception.InternalException; +import org.apache.tajo.exception.TajoInternalError; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968694

          — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/FunctionInvoke.java —
          @@ -22,6 +22,7 @@
          import org.apache.tajo.catalog.FunctionDesc;
          import org.apache.tajo.datum.Datum;
          import org.apache.tajo.exception.InternalException;
          +import org.apache.tajo.exception.TajoInternalError;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968694 — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/FunctionInvoke.java — @@ -22,6 +22,7 @@ import org.apache.tajo.catalog.FunctionDesc; import org.apache.tajo.datum.Datum; import org.apache.tajo.exception.InternalException; +import org.apache.tajo.exception.TajoInternalError; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968700

          — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/CSVLineSerializer.java —
          @@ -23,6 +23,7 @@
          import org.apache.tajo.common.TajoDataTypes;
          import org.apache.tajo.datum.AnyDatum;
          import org.apache.tajo.datum.Datum;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968700 — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/CSVLineSerializer.java — @@ -23,6 +23,7 @@ import org.apache.tajo.common.TajoDataTypes; import org.apache.tajo.datum.AnyDatum; import org.apache.tajo.datum.Datum; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968704

          — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/TextFieldSerializerDeserializer.java —
          @@ -28,6 +28,7 @@
          import org.apache.tajo.common.TajoDataTypes;
          import org.apache.tajo.datum.*;
          import org.apache.tajo.datum.protobuf.ProtobufJsonFormat;
          +import org.apache.tajo.exception.TajoInternalError;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968704 — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/TextFieldSerializerDeserializer.java — @@ -28,6 +28,7 @@ import org.apache.tajo.common.TajoDataTypes; import org.apache.tajo.datum.*; import org.apache.tajo.datum.protobuf.ProtobufJsonFormat; +import org.apache.tajo.exception.TajoInternalError; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968709

          — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/logical/SetSessionNode.java —
          @@ -19,6 +19,7 @@
          package org.apache.tajo.plan.logical;

          import com.google.gson.annotations.Expose;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968709 — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/logical/SetSessionNode.java — @@ -19,6 +19,7 @@ package org.apache.tajo.plan.logical; import com.google.gson.annotations.Expose; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968746

          — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/ProjectionPushDownRule.java —
          @@ -30,6 +30,7 @@
          import org.apache.tajo.catalog.exception.DuplicateColumnException;
          import org.apache.tajo.exception.TajoException;
          import org.apache.tajo.exception.TajoInternalError;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968746 — Diff: tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/ProjectionPushDownRule.java — @@ -30,6 +30,7 @@ import org.apache.tajo.catalog.exception.DuplicateColumnException; import org.apache.tajo.exception.TajoException; import org.apache.tajo.exception.TajoInternalError; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968754

          — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/FrameTuple.java —
          @@ -26,6 +26,7 @@
          import org.apache.tajo.datum.Datum;
          import org.apache.tajo.datum.IntervalDatum;
          import org.apache.tajo.datum.ProtobufDatum;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968754 — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/FrameTuple.java — @@ -26,6 +26,7 @@ import org.apache.tajo.datum.Datum; import org.apache.tajo.datum.IntervalDatum; import org.apache.tajo.datum.ProtobufDatum; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968758

          — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/NullScanner.java —
          @@ -21,6 +21,7 @@
          import org.apache.tajo.catalog.Schema;
          import org.apache.tajo.catalog.TableMeta;
          import org.apache.tajo.catalog.statistics.TableStats;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968758 — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/NullScanner.java — @@ -21,6 +21,7 @@ import org.apache.tajo.catalog.Schema; import org.apache.tajo.catalog.TableMeta; import org.apache.tajo.catalog.statistics.TableStats; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968807

          — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/RowStoreUtil.java —
          @@ -24,6 +24,7 @@
          import org.apache.tajo.datum.DatumFactory;
          import org.apache.tajo.datum.IntervalDatum;
          import org.apache.tajo.datum.ProtobufDatum;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968807 — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/RowStoreUtil.java — @@ -24,6 +24,7 @@ import org.apache.tajo.datum.DatumFactory; import org.apache.tajo.datum.IntervalDatum; import org.apache.tajo.datum.ProtobufDatum; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968830

          — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/Tablespace.java —
          @@ -29,6 +29,7 @@
          import org.apache.tajo.catalog.proto.CatalogProtos.FragmentProto;
          import org.apache.tajo.conf.TajoConf;
          import org.apache.tajo.exception.TajoException;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968830 — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/Tablespace.java — @@ -29,6 +29,7 @@ import org.apache.tajo.catalog.proto.CatalogProtos.FragmentProto; import org.apache.tajo.conf.TajoConf; import org.apache.tajo.exception.TajoException; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968835

          — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/HeapTuple.java —
          @@ -23,6 +23,7 @@

          import org.apache.tajo.common.TajoDataTypes;
          import org.apache.tajo.datum.*;
          +import org.apache.tajo.exception.TajoRuntimeException;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968835 — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/HeapTuple.java — @@ -23,6 +23,7 @@ import org.apache.tajo.common.TajoDataTypes; import org.apache.tajo.datum.*; +import org.apache.tajo.exception.TajoRuntimeException; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r35968841

          — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/UnSafeTuple.java —
          @@ -24,6 +24,8 @@

          import org.apache.tajo.common.TajoDataTypes;
          import org.apache.tajo.datum.*;
          +import org.apache.tajo.exception.TajoInternalError;
          — End diff –

          Please remove unused imports.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r35968841 — Diff: tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/UnSafeTuple.java — @@ -24,6 +24,8 @@ import org.apache.tajo.common.TajoDataTypes; import org.apache.tajo.datum.*; +import org.apache.tajo.exception.TajoInternalError; — End diff – Please remove unused imports.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jihoonson commented on the pull request:

          https://github.com/apache/tajo/pull/662#issuecomment-126676275

          Hi @hyunsik. Thank you for the nice patch.
          I expect that this patch and your succeeding work will prevent tajo developers including me from suffering for unexpected and abused exceptions. I hope that you can finish this work nicely.

          I left some comments. Please consider them.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/662#issuecomment-126676275 Hi @hyunsik. Thank you for the nice patch. I expect that this patch and your succeeding work will prevent tajo developers including me from suffering for unexpected and abused exceptions. I hope that you can finish this work nicely. I left some comments. Please consider them.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36055958

          — Diff: tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java —
          @@ -27,6 +28,16 @@
          public class TajoException extends Exception implements TajoExceptionInterface {
          private ResultCode code;

          + public TajoException(ReturnState e) {
          — End diff –

          Stacktrace will be used in only errors like TajoInternalError because other exceptions mean user mistake and recoverable exceptions.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36055958 — Diff: tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java — @@ -27,6 +28,16 @@ public class TajoException extends Exception implements TajoExceptionInterface { private ResultCode code; + public TajoException(ReturnState e) { — End diff – Stacktrace will be used in only errors like TajoInternalError because other exceptions mean user mistake and recoverable exceptions.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36055977

          — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java —
          @@ -91,7 +91,7 @@ public String getSystemDatabaseName()

          { return systemTableNames; }
          • private TableDescriptor getTableDescriptor(String tableName) {
            + private TableDescriptor getTableDescriptor(String tableName) throws UndefinedTableException {
              • End diff –

          I'll check it. Thanks!

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36055977 — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java — @@ -91,7 +91,7 @@ public String getSystemDatabaseName() { return systemTableNames; } private TableDescriptor getTableDescriptor(String tableName) { + private TableDescriptor getTableDescriptor(String tableName) throws UndefinedTableException { End diff – I'll check it. Thanks!
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36055982

          — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java —
          @@ -110,7 +110,7 @@ private TableDescriptor getTableDescriptor(String tableName)

          { return tableDescriptor; }
          • public CatalogProtos.TableDescProto getTableDesc(String tableName) {
            + public CatalogProtos.TableDescProto getTableDesc(String tableName) throws UndefinedTableException {
              • End diff –

          Got it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36055982 — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java — @@ -110,7 +110,7 @@ private TableDescriptor getTableDescriptor(String tableName) { return tableDescriptor; } public CatalogProtos.TableDescProto getTableDesc(String tableName) { + public CatalogProtos.TableDescProto getTableDesc(String tableName) throws UndefinedTableException { End diff – Got it.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056057

          — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java —
          @@ -179,7 +179,7 @@ public AbstractDBStore(Configuration conf) throws InternalException {
          }
          }
          }

          • } catch (Exception se) { + }

            catch (Throwable se) {

              • End diff –

          Fixed.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056057 — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java — @@ -179,7 +179,7 @@ public AbstractDBStore(Configuration conf) throws InternalException { } } } } catch (Exception se) { + } catch (Throwable se) { End diff – Fixed.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056157

          — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java —
          @@ -91,7 +91,7 @@ public String getSystemDatabaseName()

          { return systemTableNames; }
          • private TableDescriptor getTableDescriptor(String tableName) {
            + private TableDescriptor getTableDescriptor(String tableName) throws UndefinedTableException {
              • End diff –

          According to my design, it should throw an exception instead of NULL. I fixed. Thanks!

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056157 — Diff: tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java — @@ -91,7 +91,7 @@ public String getSystemDatabaseName() { return systemTableNames; } private TableDescriptor getTableDescriptor(String tableName) { + private TableDescriptor getTableDescriptor(String tableName) throws UndefinedTableException { End diff – According to my design, it should throw an exception instead of NULL. I fixed. Thanks!
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056178

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java —
          @@ -133,9 +135,10 @@ TableDesc createExternalTable(final String tableName, final Schema schema, final

          • @return Table description
          • @throws java.sql.SQLException
            */
          • TableDesc getTableDesc(final String tableName) throws SQLException;
            + TableDesc getTableDesc(final String tableName) throws UndefinedTableException;
          • List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName) throws SQLException;
            + List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName)
            + throws AmbiguousFunctionException, UndefinedFunctionException;
              • End diff –

          Fixed.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056178 — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java — @@ -133,9 +135,10 @@ TableDesc createExternalTable(final String tableName, final Schema schema, final @return Table description @throws java.sql.SQLException */ TableDesc getTableDesc(final String tableName) throws SQLException; + TableDesc getTableDesc(final String tableName) throws UndefinedTableException; List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName) throws SQLException; + List<CatalogProtos.FunctionDescProto> getFunctions(final String functionName) + throws AmbiguousFunctionException, UndefinedFunctionException; End diff – Fixed.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056184

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java —
          @@ -200,12 +231,17 @@ public TableDesc getTableDesc(final String tableName) throws SQLException

          { throw new RuntimeException(e); }
          • throwIfError(res.getState());
            + if (isThisError(res.getState(), Errors.ResultCode.UNDEFINED_TABLE)) { + throw new UndefinedTableException(res.getState()); + }

            +
            + ensureOk(res.getState());
            return CatalogUtil.newTableDesc(res.getTable());
            }

          @Override

          • public List<FunctionDescProto> getFunctions(final String functionName) throws SQLException {
            + public List<FunctionDescProto> getFunctions(final String functionName)
            + throws AmbiguousFunctionException, UndefinedFunctionException {
              • End diff –

          Fixed too.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056184 — Diff: tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java — @@ -200,12 +231,17 @@ public TableDesc getTableDesc(final String tableName) throws SQLException { throw new RuntimeException(e); } throwIfError(res.getState()); + if (isThisError(res.getState(), Errors.ResultCode.UNDEFINED_TABLE)) { + throw new UndefinedTableException(res.getState()); + } + + ensureOk(res.getState()); return CatalogUtil.newTableDesc(res.getTable()); } @Override public List<FunctionDescProto> getFunctions(final String functionName) throws SQLException { + public List<FunctionDescProto> getFunctions(final String functionName) + throws AmbiguousFunctionException, UndefinedFunctionException { End diff – Fixed too.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056280

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java —
          @@ -94,11 +97,11 @@
          *

          • @return If failed, return null.
            */
          • ResultSet executeQueryAndGetResult(final String sql) throws SQLException;
            + ResultSet executeQueryAndGetResult(final String sql) throws TajoException;
              • End diff –

          Take a look at the signature ``executeQuery`` and ``executeQueryWithJson``. They return SubmitQueryResponse which contains ReturnState. So, we should allow callers to handle the return state directly.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056280 — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java — @@ -94,11 +97,11 @@ * @return If failed, return null. */ ResultSet executeQueryAndGetResult(final String sql) throws SQLException; + ResultSet executeQueryAndGetResult(final String sql) throws TajoException; End diff – Take a look at the signature ``executeQuery`` and ``executeQueryWithJson``. They return SubmitQueryResponse which contains ReturnState. So, we should allow callers to handle the return state directly.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056327

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java —
          @@ -108,17 +111,17 @@

          TajoMemoryResultSet fetchNextQueryResult(final QueryId queryId, final int fetchRowNum) throws SQLException;

          • boolean updateQuery(final String sql) throws SQLException;
            + boolean updateQuery(final String sql) throws TajoException;
          • boolean updateQueryWithJson(final String json) throws SQLException;
            + boolean updateQueryWithJson(final String json) throws TajoException;

          List<ClientProtos.BriefQueryInfo> getRunningQueryList() throws SQLException;
          — End diff –

          They will be changed later. I tried to avoid to change not-related codes.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056327 — Diff: tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java — @@ -108,17 +111,17 @@ TajoMemoryResultSet fetchNextQueryResult(final QueryId queryId, final int fetchRowNum) throws SQLException; boolean updateQuery(final String sql) throws SQLException; + boolean updateQuery(final String sql) throws TajoException; boolean updateQueryWithJson(final String json) throws SQLException; + boolean updateQueryWithJson(final String json) throws TajoException; List<ClientProtos.BriefQueryInfo> getRunningQueryList() throws SQLException; — End diff – They will be changed later. I tried to avoid to change not-related codes.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056346

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java —
          @@ -0,0 +1,42 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.annotation.Nullable;
          +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException;
          +
          +import java.util.Map;
          +
          +public class ClientDeligateFactory {
          — End diff –

          fixed

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056346 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDeligateFactory.java — @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.annotation.Nullable; +import org.apache.tajo.client.v2.exception.ClientUnableToConnectException; + +import java.util.Map; + +public class ClientDeligateFactory { — End diff – fixed
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056394

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java —
          @@ -0,0 +1,30 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +public class ClientUtil {
          +
          + public static boolean isOk(QueryState state) {
          — End diff –

          isOk means that it is neither error or failed. It allows users to know this query is running normally.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056394 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java — @@ -0,0 +1,30 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +public class ClientUtil { + + public static boolean isOk(QueryState state) { — End diff – isOk means that it is neither error or failed. It allows users to know this query is running normally.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056435

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java —
          @@ -0,0 +1,125 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.auth.UserRoleInfo;
          +
          +import java.sql.ResultSet;
          +import java.util.concurrent.Future;
          +
          +public interface QueryFuture extends Future<ResultSet> {
          + /**
          + * Get a query id
          + *
          + * @return query id
          + */
          + String id();
          +
          + String queue();
          — End diff –

          added

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056435 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java — @@ -0,0 +1,125 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.auth.UserRoleInfo; + +import java.sql.ResultSet; +import java.util.concurrent.Future; + +public interface QueryFuture extends Future<ResultSet> { + /** + * Get a query id + * + * @return query id + */ + String id(); + + String queue(); — End diff – added
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056451

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java —
          @@ -0,0 +1,25 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import java.net.InetSocketAddress;
          +
          +public interface ServiceDiscovery {
          — End diff –

          I gave a simple comment.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056451 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java — @@ -0,0 +1,25 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import java.net.InetSocketAddress; + +public interface ServiceDiscovery { — End diff – I gave a simple comment.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056502

          — Diff: tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java —
          @@ -0,0 +1,236 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import com.facebook.presto.hive.shaded.com.google.common.collect.Lists;
          +import org.apache.tajo.QueryTestCaseBase;
          +import org.apache.tajo.catalog.exception.DuplicateDatabaseException;
          +import org.apache.tajo.catalog.exception.UndefinedDatabaseException;
          +import org.apache.tajo.catalog.exception.UndefinedTableException;
          +import org.apache.tajo.exception.TajoException;
          +import org.apache.tajo.service.ServiceTracker;
          +import org.apache.tajo.service.ServiceTrackerFactory;
          +import org.junit.AfterClass;
          +import org.junit.BeforeClass;
          +import org.junit.Test;
          +
          +import java.io.IOException;
          +import java.net.InetSocketAddress;
          +import java.sql.ResultSet;
          +import java.sql.SQLException;
          +import java.util.List;
          +import java.util.concurrent.ExecutionException;
          +import java.util.concurrent.atomic.AtomicBoolean;
          +
          +import static org.junit.Assert.*;
          +
          +public class TestTajoClientV2 extends QueryTestCaseBase {
          + private static TajoClient clientv2;
          +
          + @BeforeClass
          + public static void setUp() throws Exception {
          + conf = testingCluster.getConfiguration();
          +
          + clientv2 = new TajoClient(new ServiceDiscovery() {
          + ServiceTracker tracker = ServiceTrackerFactory.get(conf);
          + @Override
          + public InetSocketAddress clientAddress()

          { + return tracker.getClientServiceAddress(); + }

          + });
          + }
          +
          + @AfterClass
          + public static void tearDown() throws Exception

          { + clientv2.close(); + }

          +
          + @Test
          + public void testExecuteUpdate() throws TajoException {
          + clientv2.executeUpdate("create database tajoclientv2");
          + clientv2.selectDB("tajoclientv2");
          + clientv2.selectDB("default");
          + clientv2.executeUpdate("drop database tajoclientv2");
          +
          + try

          { + clientv2.selectDB("tajoclientv2"); + fail(); + }

          catch (UndefinedDatabaseException e) {
          — End diff –

          selectDB is to ensure that the database is created normally and the database is dropped normally. So, I used only the exception.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056502 — Diff: tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java — @@ -0,0 +1,236 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import com.facebook.presto.hive.shaded.com.google.common.collect.Lists; +import org.apache.tajo.QueryTestCaseBase; +import org.apache.tajo.catalog.exception.DuplicateDatabaseException; +import org.apache.tajo.catalog.exception.UndefinedDatabaseException; +import org.apache.tajo.catalog.exception.UndefinedTableException; +import org.apache.tajo.exception.TajoException; +import org.apache.tajo.service.ServiceTracker; +import org.apache.tajo.service.ServiceTrackerFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.IOException; +import java.net.InetSocketAddress; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.atomic.AtomicBoolean; + +import static org.junit.Assert.*; + +public class TestTajoClientV2 extends QueryTestCaseBase { + private static TajoClient clientv2; + + @BeforeClass + public static void setUp() throws Exception { + conf = testingCluster.getConfiguration(); + + clientv2 = new TajoClient(new ServiceDiscovery() { + ServiceTracker tracker = ServiceTrackerFactory.get(conf); + @Override + public InetSocketAddress clientAddress() { + return tracker.getClientServiceAddress(); + } + }); + } + + @AfterClass + public static void tearDown() throws Exception { + clientv2.close(); + } + + @Test + public void testExecuteUpdate() throws TajoException { + clientv2.executeUpdate("create database tajoclientv2"); + clientv2.selectDB("tajoclientv2"); + clientv2.selectDB("default"); + clientv2.executeUpdate("drop database tajoclientv2"); + + try { + clientv2.selectDB("tajoclientv2"); + fail(); + } catch (UndefinedDatabaseException e) { — End diff – selectDB is to ensure that the database is created normally and the database is dropped normally. So, I used only the exception.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36056554

          — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java —
          @@ -0,0 +1,125 @@
          +/**
          + * Licensed to the Apache Software Foundation (ASF) under one
          + * or more contributor license agreements. See the NOTICE file
          + * distributed with this work for additional information
          + * regarding copyright ownership. The ASF licenses this file
          + * to you under the Apache License, Version 2.0 (the
          + * "License"); you may not use this file except in compliance
          + * with the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.tajo.client.v2;
          +
          +import org.apache.tajo.auth.UserRoleInfo;
          +
          +import java.sql.ResultSet;
          +import java.util.concurrent.Future;
          +
          +public interface QueryFuture extends Future<ResultSet> {
          + /**
          + * Get a query id
          + *
          + * @return query id
          + */
          + String id();
          +
          + String queue();
          +
          + /**
          + * Get a query state
          + *
          + * @return query state
          + */
          + QueryState state();
          +
          + /**
          + * Get a normalized progress (0 ~ 1.0f) of a query running
          + *
          + * @return progress
          + */
          + float progress();
          +
          + /**
          + * A submitted or running query state is normal
          + *
          + * @return True if a query state is normal
          + */
          + boolean isOk();
          +
          + /**
          + * Get whether the query is successfully completed or not.
          + *
          + * @return True if the query is successfully completed.
          + */
          + boolean isCompleted();
          — End diff –

          That makes sense. I fixed.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36056554 — Diff: tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java — @@ -0,0 +1,125 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tajo.client.v2; + +import org.apache.tajo.auth.UserRoleInfo; + +import java.sql.ResultSet; +import java.util.concurrent.Future; + +public interface QueryFuture extends Future<ResultSet> { + /** + * Get a query id + * + * @return query id + */ + String id(); + + String queue(); + + /** + * Get a query state + * + * @return query state + */ + QueryState state(); + + /** + * Get a normalized progress (0 ~ 1.0f) of a query running + * + * @return progress + */ + float progress(); + + /** + * A submitted or running query state is normal + * + * @return True if a query state is normal + */ + boolean isOk(); + + /** + * Get whether the query is successfully completed or not. + * + * @return True if the query is successfully completed. + */ + boolean isCompleted(); — End diff – That makes sense. I fixed.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user hyunsik commented on the pull request:

          https://github.com/apache/tajo/pull/662#issuecomment-127128368

          I reflected the comments.

          Show
          githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/662#issuecomment-127128368 I reflected the comments.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/tajo/pull/662#discussion_r36128726

          — Diff: tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java —
          @@ -27,6 +28,16 @@
          public class TajoException extends Exception implements TajoExceptionInterface {
          private ResultCode code;

          + public TajoException(ReturnState e) {
          — End diff –

          Got it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on a diff in the pull request: https://github.com/apache/tajo/pull/662#discussion_r36128726 — Diff: tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java — @@ -27,6 +28,16 @@ public class TajoException extends Exception implements TajoExceptionInterface { private ResultCode code; + public TajoException(ReturnState e) { — End diff – Got it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jihoonson commented on the pull request:

          https://github.com/apache/tajo/pull/662#issuecomment-127402079

          +1 ship it!

          Show
          githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/662#issuecomment-127402079 +1 ship it!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

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

          I just committed it to master branch. Thank you for the reviews.

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

          FAILURE: Integrated in Tajo-master-CODEGEN-build #427 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/427/)
          TAJO-1699: Tajo Java Client version 2. (hyunsik: rev 4253f1b60429adb9558f0b7b194754557eebcf15)

          • tajo-client/src/main/java/org/apache/tajo/client/v2/FutureListener.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegateFactory.java
          • tajo-core/src/test/java/org/apache/tajo/engine/query/TestIndexScan.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientUnableToConnectException.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/CatalogException.java
          • tajo-core/src/test/java/org/apache/tajo/engine/codegen/TestEvalCodeGenerator.java
          • tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java
          • tajo-client/src/main/java/org/apache/tajo/client/ClientExceptionUtil.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java
          • tajo-common/src/main/java/org/apache/tajo/exception/NoSuchSessionVariableException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/expr/SimpleEvalNodeVisitor.java
          • tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType3.result
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java
          • tajo-client/src/main/java/org/apache/tajo/client/TajoClientUtil.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/QueryExecutor.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/TajoClient.java
          • tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java
          • tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByLegacy.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType2.result
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousTableException.java
          • tajo-core/pom.xml
          • tajo-client/src/main/java/org/apache/tajo/client/QueryClientImpl.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/QueryState.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/Tablespace.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoError.java
          • tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateIndexException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java
          • tajo-client/src/main/java/org/apache/tajo/jdbc/FetchResultSet.java
          • tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java
          • tajo-common/src/main/java/org/apache/tajo/exception/AmbiguousColumnException.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/TajoCli.java
          • tajo-client/pom.xml
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogService.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedDatabaseException.java
          • tajo-core/src/test/java/org/apache/tajo/QueryTestCaseBase.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestPatternMatchingPredicates.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTablespaceException.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/MemStore.java
          • tajo-core/src/main/java/org/apache/tajo/session/InvalidSessionException.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java
          • tajo-client/src/main/java/org/apache/tajo/client/InvalidClientSessionException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverBySubExprsAndRels.java
          • CHANGES
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/Schema.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ConnectDatabaseCommand.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestConditionalExpressions.java
          • tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTableException.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/UnSafeTuple.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRels.java
          • tajo-common/src/main/java/org/apache/tajo/exception/UnsupportedException.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java
          • tajo-core/src/main/java/org/apache/tajo/benchmark/TPCH.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/HeapTuple.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/NullScanner.java
          • tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogUtil.java
          • tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsyncWithListener.result
          • tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/verifier/VerificationState.java
          • tajo-core/src/main/java/org/apache/tajo/benchmark/BenchmarkSet.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsync.result
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicatePartitionException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/CSVLineSerializer.java
          • tajo-core/src/test/java/org/apache/tajo/client/TestTajoClientFailures.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestPredicates.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/SetCommand.java
          • tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/LegacyClientDelegate.java
          • tajo-core/src/main/java/org/apache/tajo/master/TajoMaster.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestPythonFunctions.java
          • tajo-catalog/tajo-catalog-common/src/test/java/org/apache/tajo/catalog/TestSchema.java
          • tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousFunctionException.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegate.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateColumnException.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
          • tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedColumnException.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateTableException.java
          • tajo-common/src/main/java/org/apache/tajo/exception/UndefinedOperatorException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/expr/BasicEvalNodeVisitor.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/XMLCatalogSchemaManager.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType1.result
          • tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/serder/EvalNodeDeserializer.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLDateTimeTypes.java
          • tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedFunctionException.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestIntervalType.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tools/TajoAdmin.java
          • tajo-common/src/main/java/org/apache/tajo/exception/ReturnStateUtil.java
          • tajo-core/src/test/java/org/apache/tajo/LocalTajoTestingUtility.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/ProjectionPushDownRule.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedPartitionException.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateDatabaseException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRelsAndSubExprs.java
          • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #427 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/427/ ) TAJO-1699 : Tajo Java Client version 2. (hyunsik: rev 4253f1b60429adb9558f0b7b194754557eebcf15) tajo-client/src/main/java/org/apache/tajo/client/v2/FutureListener.java tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegateFactory.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestIndexScan.java tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientUnableToConnectException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/CatalogException.java tajo-core/src/test/java/org/apache/tajo/engine/codegen/TestEvalCodeGenerator.java tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java tajo-client/src/main/java/org/apache/tajo/client/ClientExceptionUtil.java tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java tajo-common/src/main/java/org/apache/tajo/exception/NoSuchSessionVariableException.java tajo-plan/src/main/java/org/apache/tajo/plan/expr/SimpleEvalNodeVisitor.java tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/RowStoreUtil.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType3.result tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java tajo-client/src/main/java/org/apache/tajo/client/TajoClientUtil.java tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java tajo-core/src/main/java/org/apache/tajo/master/exec/QueryExecutor.java tajo-client/src/main/java/org/apache/tajo/client/v2/TajoClient.java tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByLegacy.java tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType2.result tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousTableException.java tajo-core/pom.xml tajo-client/src/main/java/org/apache/tajo/client/QueryClientImpl.java tajo-client/src/main/java/org/apache/tajo/client/v2/QueryState.java tajo-core/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/Tablespace.java tajo-common/src/main/java/org/apache/tajo/exception/TajoError.java tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateIndexException.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java tajo-client/src/main/java/org/apache/tajo/jdbc/FetchResultSet.java tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java tajo-common/src/main/java/org/apache/tajo/exception/AmbiguousColumnException.java tajo-cli/src/main/java/org/apache/tajo/cli/tsql/TajoCli.java tajo-client/pom.xml tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogService.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedDatabaseException.java tajo-core/src/test/java/org/apache/tajo/QueryTestCaseBase.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestPatternMatchingPredicates.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTablespaceException.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/MemStore.java tajo-core/src/main/java/org/apache/tajo/session/InvalidSessionException.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java tajo-client/src/main/java/org/apache/tajo/client/InvalidClientSessionException.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverBySubExprsAndRels.java CHANGES tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/Schema.java tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ConnectDatabaseCommand.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestConditionalExpressions.java tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTableException.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/UnSafeTuple.java tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRels.java tajo-common/src/main/java/org/apache/tajo/exception/UnsupportedException.java tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java tajo-core/src/main/java/org/apache/tajo/benchmark/TPCH.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/HeapTuple.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/NullScanner.java tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogUtil.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsyncWithListener.result tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java tajo-plan/src/main/java/org/apache/tajo/plan/verifier/VerificationState.java tajo-core/src/main/java/org/apache/tajo/benchmark/BenchmarkSet.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsync.result tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicatePartitionException.java tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/CSVLineSerializer.java tajo-core/src/test/java/org/apache/tajo/client/TestTajoClientFailures.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestPredicates.java tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/SetCommand.java tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java tajo-client/src/main/java/org/apache/tajo/client/v2/LegacyClientDelegate.java tajo-core/src/main/java/org/apache/tajo/master/TajoMaster.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestPythonFunctions.java tajo-catalog/tajo-catalog-common/src/test/java/org/apache/tajo/catalog/TestSchema.java tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousFunctionException.java tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegate.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateColumnException.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedColumnException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateTableException.java tajo-common/src/main/java/org/apache/tajo/exception/UndefinedOperatorException.java tajo-plan/src/main/java/org/apache/tajo/plan/expr/BasicEvalNodeVisitor.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/XMLCatalogSchemaManager.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType1.result tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java tajo-plan/src/main/java/org/apache/tajo/plan/serder/EvalNodeDeserializer.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLDateTimeTypes.java tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedFunctionException.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestIntervalType.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java tajo-cli/src/main/java/org/apache/tajo/cli/tools/TajoAdmin.java tajo-common/src/main/java/org/apache/tajo/exception/ReturnStateUtil.java tajo-core/src/test/java/org/apache/tajo/LocalTajoTestingUtility.java tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/ProjectionPushDownRule.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedPartitionException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateDatabaseException.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRelsAndSubExprs.java tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
          Hide
          hudson Hudson added a comment -

          ABORTED: Integrated in Tajo-master-build #789 (See https://builds.apache.org/job/Tajo-master-build/789/)
          TAJO-1699: Tajo Java Client version 2. (hyunsik: rev 4253f1b60429adb9558f0b7b194754557eebcf15)

          • tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousFunctionException.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTablespaceException.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/TajoClient.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/expr/SimpleEvalNodeVisitor.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegate.java
          • CHANGES
          • tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java
          • tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/QueryExecutor.java
          • tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/MemStore.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/UnSafeTuple.java
          • tajo-common/src/main/java/org/apache/tajo/exception/UndefinedOperatorException.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java
          • tajo-client/src/main/java/org/apache/tajo/jdbc/FetchResultSet.java
          • tajo-core/src/test/java/org/apache/tajo/client/TestTajoClientFailures.java
          • tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
          • tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogUtil.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType2.result
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTableException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java
          • tajo-client/src/main/java/org/apache/tajo/client/InvalidClientSessionException.java
          • tajo-core/src/test/java/org/apache/tajo/engine/codegen/TestEvalCodeGenerator.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestPredicates.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/CatalogException.java
          • tajo-core/src/main/java/org/apache/tajo/benchmark/TPCH.java
          • tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateIndexException.java
          • tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java
          • tajo-core/src/test/java/org/apache/tajo/LocalTajoTestingUtility.java
          • tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java
          • tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientUnableToConnectException.java
          • tajo-core/src/test/java/org/apache/tajo/QueryTestCaseBase.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedPartitionException.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/QueryState.java
          • tajo-core/src/main/java/org/apache/tajo/benchmark/BenchmarkSet.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java
          • tajo-common/src/main/java/org/apache/tajo/exception/UnsupportedException.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/LegacyClientDelegate.java
          • tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
          • tajo-client/src/main/java/org/apache/tajo/client/QueryClientImpl.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogService.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/Tablespace.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/ProjectionPushDownRule.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/TajoCli.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestConditionalExpressions.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateDatabaseException.java
          • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/Schema.java
          • tajo-client/pom.xml
          • tajo-plan/src/main/java/org/apache/tajo/plan/expr/BasicEvalNodeVisitor.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ConnectDatabaseCommand.java
          • tajo-common/src/main/java/org/apache/tajo/exception/NoSuchSessionVariableException.java
          • tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoError.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegateFactory.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType1.result
          • tajo-core/pom.xml
          • tajo-core/src/main/java/org/apache/tajo/session/InvalidSessionException.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/HeapTuple.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestIntervalType.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/SetCommand.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/serder/EvalNodeDeserializer.java
          • tajo-common/src/main/java/org/apache/tajo/exception/ReturnStateUtil.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByLegacy.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateTableException.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedFunctionException.java
          • tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/NullScanner.java
          • tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/CSVLineSerializer.java
          • tajo-catalog/tajo-catalog-common/src/test/java/org/apache/tajo/catalog/TestSchema.java
          • tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicatePartitionException.java
          • tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverBySubExprsAndRels.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsyncWithListener.result
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousTableException.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedDatabaseException.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java
          • tajo-client/src/main/java/org/apache/tajo/client/TajoClientUtil.java
          • tajo-core/src/main/java/org/apache/tajo/master/TajoMaster.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestPatternMatchingPredicates.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRelsAndSubExprs.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateColumnException.java
          • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedColumnException.java
          • tajo-common/src/main/java/org/apache/tajo/exception/AmbiguousColumnException.java
          • tajo-core/src/test/java/org/apache/tajo/engine/query/TestIndexScan.java
          • tajo-client/src/main/java/org/apache/tajo/client/v2/FutureListener.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsync.result
          • tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestPythonFunctions.java
          • tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/verifier/VerificationState.java
          • tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRels.java
          • tajo-cli/src/main/java/org/apache/tajo/cli/tools/TajoAdmin.java
          • tajo-client/src/main/java/org/apache/tajo/client/ClientExceptionUtil.java
          • tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType3.result
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java
          • tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java
          • tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java
          • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/XMLCatalogSchemaManager.java
          • tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLDateTimeTypes.java
          Show
          hudson Hudson added a comment - ABORTED: Integrated in Tajo-master-build #789 (See https://builds.apache.org/job/Tajo-master-build/789/ ) TAJO-1699 : Tajo Java Client version 2. (hyunsik: rev 4253f1b60429adb9558f0b7b194754557eebcf15) tajo-common/src/main/java/org/apache/tajo/exception/TajoInternalError.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousFunctionException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTablespaceException.java tajo-client/src/main/java/org/apache/tajo/client/v2/TajoClient.java tajo-plan/src/main/java/org/apache/tajo/plan/expr/SimpleEvalNodeVisitor.java tajo-client/src/main/java/org/apache/tajo/client/v2/ServiceDiscovery.java tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegate.java CHANGES tajo-core/src/test/java/org/apache/tajo/jdbc/TestTajoJdbc.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestJsonFunctions.java tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClientImpl.java tajo-core/src/main/java/org/apache/tajo/master/exec/QueryExecutor.java tajo-core/src/test/java/org/apache/tajo/client/TestTajoClient.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/MemStore.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLExpression.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/UnSafeTuple.java tajo-common/src/main/java/org/apache/tajo/exception/UndefinedOperatorException.java tajo-core/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/TajoStatement.java tajo-client/src/main/java/org/apache/tajo/jdbc/FetchResultSet.java tajo-core/src/test/java/org/apache/tajo/client/TestTajoClientFailures.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogUtil.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType2.result tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedTableException.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/NameResolver.java tajo-client/src/main/java/org/apache/tajo/client/InvalidClientSessionException.java tajo-core/src/test/java/org/apache/tajo/engine/codegen/TestEvalCodeGenerator.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestPredicates.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/CatalogException.java tajo-core/src/main/java/org/apache/tajo/benchmark/TPCH.java tajo-client/src/main/java/org/apache/tajo/client/QueryClient.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateIndexException.java tajo-client/src/main/java/org/apache/tajo/client/TajoClientImpl.java tajo-core/src/test/java/org/apache/tajo/LocalTajoTestingUtility.java tajo-core/src/test/java/org/apache/tajo/client/v2/TestTajoClientV2.java tajo-common/src/main/java/org/apache/tajo/exception/ErrorMessages.java tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientUnableToConnectException.java tajo-core/src/test/java/org/apache/tajo/QueryTestCaseBase.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedPartitionException.java tajo-client/src/main/java/org/apache/tajo/client/v2/QueryState.java tajo-core/src/main/java/org/apache/tajo/benchmark/BenchmarkSet.java tajo-client/src/main/java/org/apache/tajo/client/v2/QueryFuture.java tajo-common/src/main/java/org/apache/tajo/exception/UnsupportedException.java tajo-core/src/main/java/org/apache/tajo/master/exec/CreateTableExecutor.java tajo-client/src/main/java/org/apache/tajo/client/v2/ClientUtil.java tajo-client/src/main/java/org/apache/tajo/client/v2/LegacyClientDelegate.java tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java tajo-client/src/main/java/org/apache/tajo/client/QueryClientImpl.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogService.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/Tablespace.java tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/ProjectionPushDownRule.java tajo-cli/src/main/java/org/apache/tajo/cli/tsql/TajoCli.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestConditionalExpressions.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/RowStoreUtil.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateDatabaseException.java tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/Schema.java tajo-client/pom.xml tajo-plan/src/main/java/org/apache/tajo/plan/expr/BasicEvalNodeVisitor.java tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ConnectDatabaseCommand.java tajo-common/src/main/java/org/apache/tajo/exception/NoSuchSessionVariableException.java tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestStringOperatorsAndFunctions.java tajo-common/src/main/java/org/apache/tajo/exception/TajoError.java tajo-client/src/main/java/org/apache/tajo/client/v2/ClientDelegateFactory.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType1.result tajo-core/pom.xml tajo-core/src/main/java/org/apache/tajo/session/InvalidSessionException.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/tuple/offheap/HeapTuple.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestIntervalType.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/MetaDataTuple.java tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/SetCommand.java tajo-plan/src/main/java/org/apache/tajo/plan/serder/EvalNodeDeserializer.java tajo-common/src/main/java/org/apache/tajo/exception/ReturnStateUtil.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByLegacy.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateTableException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedFunctionException.java tajo-storage/tajo-storage-common/src/main/java/org/apache/tajo/storage/NullScanner.java tajo-jdbc/src/main/java/org/apache/tajo/jdbc/JdbcConnection.java tajo-plan/src/main/java/org/apache/tajo/plan/function/stream/CSVLineSerializer.java tajo-catalog/tajo-catalog-common/src/test/java/org/apache/tajo/catalog/TestSchema.java tajo-client/src/main/java/org/apache/tajo/client/SessionConnection.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicatePartitionException.java tajo-common/src/main/java/org/apache/tajo/exception/TajoException.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverBySubExprsAndRels.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsyncWithListener.result tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/AmbiguousTableException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedDatabaseException.java tajo-client/src/main/java/org/apache/tajo/client/v2/exception/ClientConnectionException.java tajo-client/src/main/java/org/apache/tajo/client/TajoClientUtil.java tajo-core/src/main/java/org/apache/tajo/master/TajoMaster.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestPatternMatchingPredicates.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRelsAndSubExprs.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/DuplicateColumnException.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/exception/UndefinedColumnException.java tajo-common/src/main/java/org/apache/tajo/exception/AmbiguousColumnException.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestIndexScan.java tajo-client/src/main/java/org/apache/tajo/client/v2/FutureListener.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryAsync.result tajo-core/src/main/java/org/apache/tajo/webapp/QueryExecutorServlet.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestPythonFunctions.java tajo-client/src/main/java/org/apache/tajo/client/CatalogAdminClient.java tajo-plan/src/main/java/org/apache/tajo/plan/verifier/VerificationState.java tajo-plan/src/main/java/org/apache/tajo/plan/nameresolver/ResolverByRels.java tajo-cli/src/main/java/org/apache/tajo/cli/tools/TajoAdmin.java tajo-client/src/main/java/org/apache/tajo/client/ClientExceptionUtil.java tajo-core/src/test/resources/results/TestTajoClientV2/testExecuteQueryType3.result tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java tajo-common/src/main/java/org/apache/tajo/exception/SQLExceptionUtil.java tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/XMLCatalogSchemaManager.java tajo-core/src/test/java/org/apache/tajo/engine/eval/TestSQLDateTimeTypes.java

            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