pengzhiwei2018 commented on a change in pull request #2651:
URL: https://github.com/apache/hudi/pull/2651#discussion_r602094723



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java
##########
@@ -276,6 +276,16 @@ public static void processFiles(FileSystem fs, String 
basePathStr, Function<File
     }
   }
 
+  public static FileStatus[] getFilesInPartition(HoodieEngineContext 
engineContext, HoodieMetadataConfig metadataConfig,
+                                                 String basePathStr, Path 
partitionPath) {
+    try (HoodieTableMetadata tableMetadata = 
HoodieTableMetadata.create(engineContext,
+        metadataConfig, basePathStr, 
FileSystemViewStorageConfig.DEFAULT_VIEW_SPILLABLE_DIR)) {
+      return tableMetadata.getAllFilesInPartition(partitionPath);
+    } catch (Exception e) {
+      throw new HoodieException("Error get files in partition from metadata 
table", e);

Review comment:
       Fixed!




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to