gong commented on code in PR #7558:
URL: https://github.com/apache/inlong/pull/7558#discussion_r1133509108


##########
inlong-sort/sort-connectors/elasticsearch-6/src/main/java/org/apache/inlong/sort/elasticsearch6/Elasticsearch6BulkProcessorIndexer.java:
##########
@@ -53,32 +49,10 @@ class Elasticsearch6BulkProcessorIndexer implements 
RequestIndexer {
     }
 
     @Override
-    public void add(DeleteRequest... deleteRequests) {
-        for (DeleteRequest deleteRequest : deleteRequests) {
-            if (flushOnCheckpoint) {
-                numPendingRequestsRef.getAndIncrement();
-            }
-            this.bulkProcessor.add(deleteRequest);
-        }
-    }
-
-    @Override
-    public void add(IndexRequest... indexRequests) {
-        for (IndexRequest indexRequest : indexRequests) {
-            if (flushOnCheckpoint) {
-                numPendingRequestsRef.getAndIncrement();
-            }
-            this.bulkProcessor.add(indexRequest);
-        }
-    }
-
-    @Override
-    public void add(UpdateRequest... updateRequests) {
-        for (UpdateRequest updateRequest : updateRequests) {
-            if (flushOnCheckpoint) {
-                numPendingRequestsRef.getAndIncrement();
-            }
-            this.bulkProcessor.add(updateRequest);
+    public void add(DocWriteRequest<?> request) {
+        if (flushOnCheckpoint) {
+            numPendingRequestsRef.getAndIncrement();

Review Comment:
   Will remove `for` cause other problem?



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