You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "fsk119 (via GitHub)" <gi...@apache.org> on 2023/07/20 10:36:21 UTC

[GitHub] [flink] fsk119 opened a new pull request, #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module

fsk119 opened a new pull request, #23034:
URL: https://github.com/apache/flink/pull/23034

   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *Currently the jdbc bundle jar also includes flink-core and sql-client jar. However, the jdbc bundle relies on flink-core is because we use AutoCloseableRegistry in the ExecutorImpl. So we copy the class from the flink-core and remove the dependency.*
   
   *I think the jdbc-bundle jar is used in the java program, which provides a client to communicate with gateway. Sql-client prodives a terminal client for users to submit their sql easily. So I think it should the sql-client relies on the jdbc, which is different from the current implementation.*
   
   
   ## Brief change log
   
     - *Copy the AutoCloseableRegistry from the flink-core to jdbc module*
     - *Move the Executor from the sql-client module to jdbc module. The Executor provides a low level API to submit sql to the gateway comparing to the jdbc.*
     - *Change the dependency between jdbc and sql-client.*
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 closed pull request #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module

Posted by "fsk119 (via GitHub)" <gi...@apache.org>.
fsk119 closed pull request #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module
URL: https://github.com/apache/flink/pull/23034


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 commented on pull request #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module

Posted by "fsk119 (via GitHub)" <gi...@apache.org>.
fsk119 commented on PR #23034:
URL: https://github.com/apache/flink/pull/23034#issuecomment-1644903865

   The PR only decrease the bundle jar from 21MB to 18MB because we can not remove the flink-core easily. On the other hand, many users may use the ExecutorImpl to build their own platform. The change in this PR modifies the class package. So it's better to delay the change until we can remove the flink-core.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 commented on pull request #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module

Posted by "fsk119 (via GitHub)" <gi...@apache.org>.
fsk119 commented on PR #23034:
URL: https://github.com/apache/flink/pull/23034#issuecomment-1644218489

   Hi @zentol. The reason we bundle flink-core is to make the tool easier to use. They can just add the jdbc-bundle dependency in their projects without detailed dependency management.
   
   I think it is difficult for jdbc users to use flink-dist. As the example "FlinkDriverExample" shows, users only need to write java code to communicate with the running remote gateway service without building flink-dist in the local environment.
   
   Your suggestion about the usage of the IOUtils makes me realize it's difficult to remove the flink-core... Many dependencies used by the flink-jdbc-bundle use `org.apache.flink.util.Preconditions` everywhere, e.g. `RestClient`. I think it's not possible to remove this directly.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on a diff in pull request #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module

Posted by "zentol (via GitHub)" <gi...@apache.org>.
zentol commented on code in PR #23034:
URL: https://github.com/apache/flink/pull/23034#discussion_r1269459880


##########
flink-table/flink-sql-jdbc-driver/src/main/java/org/apache/flink/table/gateway/AutoCloseableRegistry.java:
##########
@@ -0,0 +1,124 @@
+/*
+ * 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.flink.table.gateway;
+
+import org.apache.flink.util.IOUtils;

Review Comment:
   this is a flink-core dependency



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 commented on pull request #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module

Posted by "fsk119 (via GitHub)" <gi...@apache.org>.
fsk119 commented on PR #23034:
URL: https://github.com/apache/flink/pull/23034#issuecomment-1643771788

   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #23034: [FLINK-32618][jdbc-driver] Remove flink-core dependency from jdbc module

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #23034:
URL: https://github.com/apache/flink/pull/23034#issuecomment-1643686840

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2f06bc3c88af967d2f67b9a13b7f220735003842",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2f06bc3c88af967d2f67b9a13b7f220735003842",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2f06bc3c88af967d2f67b9a13b7f220735003842 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org