CTTY commented on code in PR #11805:
URL: https://github.com/apache/hudi/pull/11805#discussion_r1744897282


##########
hudi-io/src/main/java/org/apache/hudi/storage/HoodieStorage.java:
##########
@@ -426,6 +426,26 @@ public List<StoragePathInfo> 
listDirectEntries(List<StoragePath> pathList) throw
     return result;
   }
 
+  /**
+   * Lists the file info of the direct files/directories in the given list of 
paths
+   * and filters the results, if the paths are directory.
+   *
+   * @param pathList given path list.
+   * @param filter filter to apply.
+   * @return the list of path info of the files/directories in the given paths.
+   * @throws FileNotFoundException when the path does not exist.
+   * @throws IOException           IO error.
+   */
+  @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
+  public List<StoragePathInfo> listDirectEntries(List<StoragePath> pathList,
+                                                 StoragePathFilter filter) 
throws IOException {
+    List<StoragePathInfo> result = new ArrayList<>();
+    for (StoragePath path : pathList) {
+      result.addAll(listDirectEntries(path, filter));
+    }
+    return result;

Review Comment:
   We cannot use stream here because the lambda `listDirectEntries` need to 
throw `IOException`



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