dramaticlly commented on code in PR #7976:
URL: https://github.com/apache/iceberg/pull/7976#discussion_r1287768670


##########
core/src/test/java/org/apache/iceberg/io/TestResolvingIO.java:
##########
@@ -47,4 +59,35 @@ public void testResolvingFileIOJavaSerialization() throws 
IOException, ClassNotF
     FileIO roundTripSerializedFileIO = 
TestHelpers.roundTripSerialize(testResolvingFileIO);
     
assertThat(roundTripSerializedFileIO.properties()).isEqualTo(testResolvingFileIO.properties());
   }
+
+  @Test
+  public void resolveFileIOBulkDeletion() throws IOException {
+    // configure resolving fileIO
+    ResolvingFileIO resolvingFileIO = new ResolvingFileIO();
+    Configuration hadoopConf = new Configuration();
+    resolvingFileIO.setConf(hadoopConf);
+    resolvingFileIO.initialize(
+        ImmutableMap.of("io-impl", "org.apache.iceberg.hadoop.HadoopFileIO"));
+    // configure delegation IO
+    HadoopFileIO delegate = new HadoopFileIO(hadoopConf);
+    FileSystem fs = FileSystem.getLocal(hadoopConf);
+    Path parent = new Path(tempDir.toURI());
+    // write
+    List<Path> randomFilePaths =
+        IntStream.range(1, 10)
+            .mapToObj(i -> new Path(parent, "random-" + i + "-" + 
UUID.randomUUID()))
+            .collect(Collectors.toList());
+    for (Path randomFilePath : randomFilePaths) {
+      fs.createNewFile(randomFilePath);
+      
assertThat(delegate.newInputFile(randomFilePath.toUri().toString()).exists()).isTrue();
+    }
+    // bulk deletion
+    List<String> randomFilePathString =

Review Comment:
   thank you @RussellSpitzer . I tried to add the non-bulk deletion test below 
using the InMemoryFileIO as it's one of few (if not the only one) FileIO 
implementation does not implement `SupportsBulkOperations`. In order to make it 
work, I have to add extra scheme to fileIOImplementation map, I think we also 
needs a way to customize that map as we currently only have s3 and hadoop as 
options there (gcp also gets added recently)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to