-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-7041] Optimize the memory usage of timeline server for table service #10002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -408,6 +408,11 @@ protected void removeReplacedFileIdsAtInstants(Set<String> instants) { | |
| fgIdToReplaceInstants.entrySet().removeIf(entry -> instants.contains(entry.getValue().getTimestamp())); | ||
| } | ||
|
|
||
| @Override | ||
| protected boolean hasReplacedFilesInPartition(String partitionPath) { | ||
| return fgIdToReplaceInstants.keySet().stream().anyMatch(fg -> fg.getPartitionPath().equals(partitionPath)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should also format the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| } | ||
|
|
||
| @Override | ||
| protected Option<HoodieInstant> getReplaceInstant(final HoodieFileGroupId fileGroupId) { | ||
| return Option.ofNullable(fgIdToReplaceInstants.get(fileGroupId)); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,6 +182,11 @@ public Stream<FileSlice> getLatestFileSlices(String partitionPath) { | |
| return execute(partitionPath, preferredView::getLatestFileSlices, secondaryView::getLatestFileSlices); | ||
| } | ||
|
|
||
| @Override | ||
| public Stream<FileSlice> getLatestFileSlicesStateless(String partitionPath) { | ||
| return execute(partitionPath, preferredView::getLatestFileSlicesStateless, secondaryView::getLatestFileSlicesStateless); | ||
| } | ||
|
|
||
| @Override | ||
| public Stream<FileSlice> getLatestUnCompactedFileSlices(String partitionPath) { | ||
| return execute(partitionPath, preferredView::getLatestUnCompactedFileSlices, | ||
|
|
@@ -222,6 +227,11 @@ public Stream<HoodieFileGroup> getAllFileGroups(String partitionPath) { | |
| return execute(partitionPath, preferredView::getAllFileGroups, secondaryView::getAllFileGroups); | ||
| } | ||
|
|
||
| @Override | ||
| public Stream<HoodieFileGroup> getAllFileGroupsStateless(String partitionPath) { | ||
| return execute(partitionPath, preferredView::getAllFileGroupsStateless, secondaryView::getAllFileGroupsStateless); | ||
| } | ||
|
||
|
|
||
| @Override | ||
| public Stream<HoodieFileGroup> getReplacedFileGroupsBeforeOrOn(String maxCommitTime, String partitionPath) { | ||
| return execute(maxCommitTime, partitionPath, preferredView::getReplacedFileGroupsBeforeOrOn, secondaryView::getReplacedFileGroupsBeforeOrOn); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works when
cleanerParallelismis smaller than the size ofpartitionsToClean.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and this is also reasonable.