This is an automated email from the ASF dual-hosted git repository.

JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new bc5723b163 [obs] Add listFilesIterative implementation in 
HadoopCompliantFileIO (#8960)
bc5723b163 is described below

commit bc5723b163036a035f9740a45881479e2f302c7c
Author: Eunbin Son <[email protected]>
AuthorDate: Mon Aug 3 20:07:44 2026 +0900

    [obs] Add listFilesIterative implementation in HadoopCompliantFileIO (#8960)
---
 .../apache/paimon/obs/HadoopCompliantFileIO.java    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git 
a/paimon-filesystems/paimon-obs-impl/src/main/java/org/apache/paimon/obs/HadoopCompliantFileIO.java
 
b/paimon-filesystems/paimon-obs-impl/src/main/java/org/apache/paimon/obs/HadoopCompliantFileIO.java
index 1bf35c6401..199b2ee2dd 100644
--- 
a/paimon-filesystems/paimon-obs-impl/src/main/java/org/apache/paimon/obs/HadoopCompliantFileIO.java
+++ 
b/paimon-filesystems/paimon-obs-impl/src/main/java/org/apache/paimon/obs/HadoopCompliantFileIO.java
@@ -22,6 +22,7 @@ import org.apache.paimon.fs.FileIO;
 import org.apache.paimon.fs.FileStatus;
 import org.apache.paimon.fs.Path;
 import org.apache.paimon.fs.PositionOutputStream;
+import org.apache.paimon.fs.RemoteIterator;
 import org.apache.paimon.fs.SeekableInputStream;
 
 import org.apache.hadoop.fs.FSDataInputStream;
@@ -79,6 +80,26 @@ public abstract class HadoopCompliantFileIO implements 
FileIO {
         return statuses;
     }
 
+    @Override
+    public RemoteIterator<FileStatus> listFilesIterative(Path path, boolean 
recursive)
+            throws IOException {
+        org.apache.hadoop.fs.Path hadoopPath = path(path);
+        
org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> 
hadoopIter =
+                getFileSystem(hadoopPath).listFiles(hadoopPath, recursive);
+        return new RemoteIterator<FileStatus>() {
+            @Override
+            public boolean hasNext() throws IOException {
+                return hadoopIter.hasNext();
+            }
+
+            @Override
+            public FileStatus next() throws IOException {
+                org.apache.hadoop.fs.FileStatus hadoopStatus = 
hadoopIter.next();
+                return new HadoopFileStatus(hadoopStatus);
+            }
+        };
+    }
+
     @Override
     public boolean exists(Path path) throws IOException {
         org.apache.hadoop.fs.Path hadoopPath = path(path);

Reply via email to