You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2026/08/03 11:07:50 UTC
(paimon) branch master updated: [obs] Add listFilesIterative implementation in HadoopCompliantFileIO (#8960)
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 <58...@users.noreply.github.com>
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);