gaborgsomogyi commented on code in PR #29129:
URL: https://github.com/apache/flink/pull/29129#discussion_r3976336227


##########
flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3FileSystem.java:
##########
@@ -406,6 +419,87 @@ public boolean delete(Path path, boolean recursive) throws 
IOException {
         }
     }
 
+    /**
+     * Deletes every object under the given key prefix. Lists all keys with a 
single flat (i.e.
+     * non-delimited) listing, then either issues one {@code DeleteObjects} 
batch request per
+     * {@value #DELETE_BATCH_SIZE} keys, or falls back to one {@code 
DeleteObject} request per key
+     * when {@link #deleteBatchEnabled} is {@code false} (e.g. for 
S3-compatible stores that don't
+     * support multi-object delete).
+     */
+    private void deleteRecursively(S3Client s3Client, String key) throws 
IOException {
+        final String prefix = key.endsWith("/") ? key : key + "/";
+        final List<String> keysToDelete = new ArrayList<>();

Review Comment:
   Made it page based



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