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_r389771923
##########
File path:
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/GenericJdbcSinkFunction.java
##########
@@ -19,18 +19,18 @@
package org.apache.flink.api.java.io.jdbc;
import org.apache.flink.api.common.functions.RuntimeContext;
-import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.runtime.state.FunctionInitializationContext;
import org.apache.flink.runtime.state.FunctionSnapshotContext;
import org.apache.flink.streaming.api.checkpoint.CheckpointedFunction;
import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
-import org.apache.flink.types.Row;
-class JDBCUpsertSinkFunction extends RichSinkFunction<Tuple2<Boolean, Row>>
implements CheckpointedFunction {
- private final JDBCUpsertOutputFormat outputFormat;
+import java.io.IOException;
- JDBCUpsertSinkFunction(JDBCUpsertOutputFormat outputFormat) {
+class GenericJdbcSinkFunction<T> extends RichSinkFunction<T> implements
CheckpointedFunction {
+ private final AbstractJdbcOutputFormat<T > outputFormat;
+
+ GenericJdbcSinkFunction(AbstractJdbcOutputFormat<T > outputFormat) {
this.outputFormat = outputFormat;
Review comment:
Add a null check?
----------------------------------------------------------------
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