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/09/13 03:24:56 UTC

[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #2706: [DEV][Api] Replace SeaTunnelContext with JobContext and remove singleton pattern

TyrantLucifer commented on code in PR #2706:
URL: https://github.com/apache/incubator-seatunnel/pull/2706#discussion_r969105898


##########
seatunnel-connectors-v2/connector-elasticsearch/src/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/config/SinkConfig.java:
##########
@@ -36,10 +36,10 @@ public class SinkConfig {
     public static final String MAX_RETRY_SIZE = "max_retry_size";
 
     public static void setValue(org.apache.seatunnel.shade.com.typesafe.config.Config pluginConfig){
-        if(pluginConfig.hasPath(MAX_BATCH_SIZE)){
+        if (pluginConfig.hasPath(MAX_BATCH_SIZE)){
             BulkConfig.MAX_BATCH_SIZE = pluginConfig.getInt(MAX_BATCH_SIZE);
         }
-        if(pluginConfig.hasPath(MAX_RETRY_SIZE)){
+        if (pluginConfig.hasPath(MAX_RETRY_SIZE)){

Review Comment:
   The same as above.



##########
seatunnel-connectors-v2/connector-elasticsearch/src/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/sink/ElasticsearchSinkWriter.java:
##########
@@ -42,7 +44,7 @@
 /**
  * ElasticsearchSinkWriter is a sink writer that will write {@link SeaTunnelRow} to Elasticsearch.
  */
-public class ElasticsearchSinkWriter<ElasticsearchSinkState> implements SinkWriter<SeaTunnelRow, ElasticsearchCommitInfo, ElasticsearchSinkState> {
+public class ElasticsearchSinkWriter<ElasticsearchSinkStateT> implements SinkWriter<SeaTunnelRow, ElasticsearchCommitInfo, ElasticsearchSinkStateT> {

Review Comment:
   Why change the class name?



##########
seatunnel-connectors-v2/connector-elasticsearch/src/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/config/SinkConfig.java:
##########
@@ -36,10 +36,10 @@ public class SinkConfig {
     public static final String MAX_RETRY_SIZE = "max_retry_size";
 
     public static void setValue(org.apache.seatunnel.shade.com.typesafe.config.Config pluginConfig){
-        if(pluginConfig.hasPath(MAX_BATCH_SIZE)){
+        if (pluginConfig.hasPath(MAX_BATCH_SIZE)){

Review Comment:
   `if (pluginConfig.hasPath(MAX_BATCH_SIZE)) {` is better.



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