xicm commented on code in PR #11250:
URL: https://github.com/apache/hudi/pull/11250#discussion_r1604288451
##########
hudi-common/src/main/java/org/apache/hudi/metadata/FileSystemBackedTableMetadata.java:
##########
@@ -163,8 +165,13 @@ private List<String>
getPartitionPathWithPathPrefixUsingFilterExpression(String
"Listing all partitions with prefix " + relativePathPrefix);
// Need to use serializable file status here, see HUDI-5936
List<StoragePathInfo> dirToFileListing =
engineContext.flatMap(pathsToList, path -> {
- HoodieStorage storage = HoodieStorageUtils.getStorage(path,
storageConf);
- return storage.listDirectEntries(path).stream();
+ try {
+ HoodieStorage storage = HoodieStorageUtils.getStorage(path,
storageConf);
+ return storage.listDirectEntries(path).stream();
+ } catch (FileNotFoundException e) {
+ // The partition may have been cleaned.
+ return Stream.empty();
+ }
Review Comment:
If we enable Partition TTL, partition may be cleaned by Task Manager and
there will throw a FileNotFoundException.
--
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]