You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/12/24 12:39:31 UTC

[GitHub] [flink] kezhuw commented on a change in pull request #14466: [FLINK-20657][connectors/jdbc] Migrate jdbc InputFormat/LookupFunction to SimpleJdbcConnectionProvider for connection establishment

kezhuw commented on a change in pull request #14466:
URL: https://github.com/apache/flink/pull/14466#discussion_r548518932



##########
File path: flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/connection/JdbcConnectionProvider.java
##########
@@ -20,13 +20,40 @@
 import org.apache.flink.annotation.Internal;
 
 import java.sql.Connection;
+import java.sql.SQLException;
 
 /**
  * JDBC connection provider.
  */
 @Internal
 public interface JdbcConnectionProvider {
-	Connection getConnection() throws Exception;
+	/**
+	 * Get existing connection.
+	 *
+	 * @return existing connection
+	 */
+	Connection getExistingConnection();
 
-	Connection reestablishConnection() throws Exception;
+	/**
+	 * Get existing connection or establish an new one if there is none.
+	 *
+	 * @return existing connection or newly established connection
+	 * @throws SQLException sql exception
+	 * @throws ClassNotFoundException driver class not found
+	 */
+	Connection getConnection() throws SQLException, ClassNotFoundException;

Review comment:
       I had this tendence too and already had a fixup commit in local, I will push that commit soon.




----------------------------------------------------------------
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.

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