You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "gong (via GitHub)" <gi...@apache.org> on 2023/03/13 06:59:18 UTC

[GitHub] [inlong] gong commented on a diff in pull request #7558: [INLONG-7557][Sort] Fix class incompatible error between elasticsearch6 with elasticsearch7

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

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