[HUDI-3406] Rollback incorrectly relying on FS listing instead of Com… (#4957)
* [HUDI-3406] Rollback incorrectly relying on FS listing instead of Commit Metadata * [HUDI-3406] Rollback incorrectly relying on FS listing instead of Commit Metadata * [HUDI-3406] Rollback incorrectly relying on FS listing instead of Commit Metadata * fix comments * fix comments * fix comments
This commit is contained in:
@@ -137,6 +137,19 @@ public class HoodieCommitMetadata implements Serializable {
|
||||
return fullPaths;
|
||||
}
|
||||
|
||||
public List<String> getFullPathsByPartitionPath(String basePath, String partitionPath) {
|
||||
HashSet<String> fullPaths = new HashSet<>();
|
||||
if (getPartitionToWriteStats().get(partitionPath) != null) {
|
||||
for (HoodieWriteStat stat : getPartitionToWriteStats().get(partitionPath)) {
|
||||
if ((stat.getFileId() != null)) {
|
||||
String fullPath = FSUtils.getPartitionPath(basePath, stat.getPath()).toString();
|
||||
fullPaths.add(fullPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new ArrayList<>(fullPaths);
|
||||
}
|
||||
|
||||
public Map<HoodieFileGroupId, String> getFileGroupIdAndFullPaths(String basePath) {
|
||||
Map<HoodieFileGroupId, String> fileGroupIdToFullPaths = new HashMap<>();
|
||||
for (Map.Entry<String, List<HoodieWriteStat>> entry : getPartitionToWriteStats().entrySet()) {
|
||||
|
||||
Reference in New Issue
Block a user