You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "steveloughran (via GitHub)" <gi...@apache.org> on 2024/08/13 18:25:50 UTC

Re: [PR] Use SupportsPrefixOperations for Remove OrphanFile Procedure [iceberg]

steveloughran commented on code in PR #7914:
URL: https://github.com/apache/iceberg/pull/7914#discussion_r1715740496


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -330,11 +345,18 @@ private Dataset<String> listedFileDS() {
     Broadcast<SerializableConfiguration> conf = sparkContext().broadcast(hadoopConf);
     ListDirsRecursively listDirs = new ListDirsRecursively(conf, olderThanTimestamp, pathFilter);
     JavaRDD<String> matchingLeafFileRDD = subDirRDD.mapPartitions(listDirs);
-
     JavaRDD<String> completeMatchingFileRDD = matchingFileRDD.union(matchingLeafFileRDD);
     return spark().createDataset(completeMatchingFileRDD.rdd(), Encoders.STRING());
   }
 
+  private Dataset<String> listedFileDS() {

Review Comment:
   is this actually used? I can't see it being invoked



##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/DeleteOrphanFilesSparkAction.java:
##########
@@ -299,7 +300,21 @@ private Dataset<FileURI> actualFileIdentDS() {
     }
   }
 
-  private Dataset<String> listedFileDS() {
+  private Dataset<String> listWithPrefix() {
+    List<String> matchingFiles = Lists.newArrayList();

Review Comment:
   this is going to have fantastic speedups with S3 and any Hadoop FS which does deep listing (s3, gcs). 
   



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org