leo65535 commented on a change in pull request #1287:
URL: 
https://github.com/apache/incubator-seatunnel/pull/1287#discussion_r813462583



##########
File path: 
seatunnel-connectors/seatunnel-connector-flink-druid/src/main/java/org/apache/seatunnel/flink/sink/DruidSink.java
##########
@@ -45,14 +47,16 @@
     private String timestampFormat;
     private String timestampMissingValue;
 
+    @Nullable
     @Override
-    public DataSink<Row> outputBatch(FlinkEnvironment env, DataSet<Row> 
dataSet) {
-        DataSink<Row> dataSink = dataSet.output(new 
DruidOutputFormat(coordinatorURL, datasource, timestampColumn, timestampFormat, 
timestampMissingValue));
+    public DataStreamSink<Row> outputStream(FlinkEnvironment env, 
DataStream<Row> dataStream) {
+        DataStreamSink<Row> rowDataStreamSink = dataStream.addSink(new 
DruidSinkFunction<>(
+                new DruidOutputFormat<>(coordinatorURL, datasource, 
timestampColumn, timestampFormat, timestampMissingValue)));
         if (config.hasPath(PARALLELISM)) {
             int parallelism = config.getInt(PARALLELISM);
-            return dataSink.setParallelism(parallelism);
+            rowDataStreamSink.setParallelism(parallelism);
         }
-        return dataSink;
+        return null;

Review comment:
       Thanks for your review @asdf2014 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to