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


##########
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:
   We still probably need a a non-bulk delete test? Currently this would only 
make sure the non-fallback method works correct?



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