You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/03/17 09:28:09 UTC

[GitHub] [incubator-seatunnel] ruanwenjun commented on a change in pull request #1452: [Feature][connector] Support batch mode and stream data for Druid Sink

ruanwenjun commented on a change in pull request #1452:
URL: https://github.com/apache/incubator-seatunnel/pull/1452#discussion_r828908996



##########
File path: seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-druid/src/main/java/org/apache/seatunnel/flink/sink/DruidOutputFormat.java
##########
@@ -64,25 +65,29 @@
     private static final String DEFAULT_TIMESTAMP_COLUMN = "timestamp";
     private static final String DEFAULT_TIMESTAMP_FORMAT = "auto";
     private static final DateTime DEFAULT_TIMESTAMP_MISSING_VALUE = null;
+    private static final long DEFAULT_BATCH_SIZE = 1024;
 
-    private final transient StringBuffer data;
+    private final StringBuffer data = new StringBuffer();

Review comment:
       In my knowledge, the `RichOutputFormat` in Flink will create for each thread, it's threadsafe, so we can just use StringBuilder and long here.




-- 
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: commits-unsubscribe@seatunnel.apache.org

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