kl0u commented on a change in pull request #11061: [FLINK-15782]
[connectors/jdbc] JDBC sink DataStream API
URL: https://github.com/apache/flink/pull/11061#discussion_r389780755
##########
File path:
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/executor/JdbcBatchStatementExecutor.java
##########
@@ -16,29 +16,27 @@
* limitations under the License.
*/
-package org.apache.flink.api.java.io.jdbc.writer;
+package org.apache.flink.api.java.io.jdbc.executor;
-import org.apache.flink.api.java.tuple.Tuple2;
-import org.apache.flink.types.Row;
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.api.java.io.jdbc.JdbcStatementBuilder;
-import java.io.Serializable;
import java.sql.Connection;
import java.sql.SQLException;
+import java.util.function.Function;
/**
- * JDBCWriter used to execute statements (e.g. INSERT, UPSERT, DELETE).
+ * Executes the given JDBC statement in batch for the accumulated records.
*/
-public interface JDBCWriter extends Serializable {
+@Internal
+public interface JdbcBatchStatementExecutor<T> {
Review comment:
Here all the methods are expected to only throw `SQLException` and then, in
many cases, we wrap the exceptions in other types. Does it make sense to simply
have these methods throw an `Exception`?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services