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



##########
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:
       Hi @ruanwenjun, thanks for your comment. Could you please share the 
relate doc, so that I can learn more details about it, thanks

##########
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 the [benchmark 
result](https://github.com/asdf2014/yuzhouwan/blob/master/yuzhouwan-hacker/src/test/java/com/yuzhouwan/hacker/algorithms/thread/sync/StringBufferTest.java#L45),
 it seems the performance of StringBuffer and StringBuilder have not obvious 
different.




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