smdsbz opened a new issue, #4791:
URL: https://github.com/apache/paimon/issues/4791

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Motivation
   
   Currently the `FileIO` interface only supports listing all files / 
directories under a given path at a time. As a consequence callers of `FileIO`, 
e.g. `ObjectRefresh`, can only choose to load the entire catalog of files into 
memory, which may lead to poor performance and OOM.
   
   ### Solution
   
   Introduce paged list API like the following:
   
   ```java
   Pair<FileStatus[], String> listFilesPaged(
           Path path, boolean recursive, long pageSize, @Nullable String 
continuationToken)
   ```
   
   This should allow implementations to take advantage of batched list APIs 
that are commonly seen in object stores, e.g. ListObjectsV2 with continuation 
token.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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

Reply via email to