yuzelin commented on code in PR #852:
URL: https://github.com/apache/incubator-paimon/pull/852#discussion_r1161560290
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreExpireImpl.java:
##########
@@ -226,28 +239,39 @@ private void expireUntil(long earliestId, long
endExclusiveId) {
writeEarliestHint(endExclusiveId);
}
- private void expireMergeTreeFiles(String manifestListName) {
-
expireMergeTreeFiles(getManifestEntriesFromManifestList(manifestListName));
+ // return a map of partition-buckets of which data files have been deleted
+ private Map<BinaryRow, Set<Integer>> expireMergeTreeFiles(String
manifestListName) {
+ return
expireMergeTreeFiles(getManifestEntriesFromManifestList(manifestListName));
}
@VisibleForTesting
- void expireMergeTreeFiles(Iterable<ManifestEntry> dataFileLog) {
+ Map<BinaryRow, Set<Integer>> expireMergeTreeFiles(Iterable<ManifestEntry>
dataFileLog) {
// we cannot delete a data file directly when we meet a DELETE entry,
because that
// file might be upgraded
Map<Path, List<Path>> dataFileToDelete = new HashMap<>();
Review Comment:
I think it's better to use `Map<BinaryRow, List<Map<Integer,
DataFileMeta>>>`, it records `partition -> bucket -> DataFileMeta`. We can
build data file and directory from this map together.
--
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]