Add new compaction config and status APIs served by the Overlord#17834
Add new compaction config and status APIs served by the Overlord#17834kfaraz merged 26 commits intoapache:masterfrom
Conversation
| public void testSetCompactionTaskLimit() | ||
| { | ||
| final DruidCompactionConfig defaultConfig | ||
| resource.setCompactionTaskLimit(0.1, 100, mockHttpServletRequest); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
| * a {@code priorityDatasource}. | ||
| */ | ||
| public abstract class BaseCandidateSearchPolicy | ||
| implements CompactionCandidateSearchPolicy, Comparator<CompactionCandidate> |
There was a problem hiding this comment.
What's the reason to remove the comparator interface?
There was a problem hiding this comment.
Keeping a plain Comparator made it difficult to find the places where the comparison was actually being used, since a search would show up all the usages of a Comparator.compare in the entire code base.
So I removed this interface and just added a new method compareCandidates instead of the usual compare method.
adarshsanjeev
left a comment
There was a problem hiding this comment.
Overall, this seems fine. Thanks for adding tests for all the resources as it moving APIs is likely to break something.
Do the removed APIs also need to be mentioned in the PR description/patch notes?
@adarshsanjeev , I do plan to add documentation for new APIs today. |
| updateCompactionTaskSlot( | ||
| clusterConfig.getCompactionTaskSlotRatio(), | ||
| clusterConfig.getMaxCompactionTaskSlots() + 10 | ||
| ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
| updateCompactionTaskSlot( | ||
| clusterConfig.getCompactionTaskSlotRatio(), | ||
| clusterConfig.getMaxCompactionTaskSlots() | ||
| ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note test
|
Merging as the CodeQL alerts are unrelated to the changes in this PR. |
|
Thanks a lot for sharing your thoughts on the APIs in this PR, @vogievetsky ! |
Changes
useSupervisorsis true, read and write compaction supervisorsusing the
CompactionScheduleror theSupervisorManageruseSupervisorsis false, read and write compaction configs usingCoordinatorConfigManagerCoordinatorCompactionConfigsResourcetoCoordinatorConfigManagerCoordinatorConfigManagerinOverlordCompactionResourceto manipulate compaction configsCompactionSupervisorManagerto act as a wrapper overSupervisorManagerand allowmanipulation of compaction supervisor specs
OverlordCompactionSchedulerintroduced in Use compaction dynamic config to enable compaction supervisors #17782Release note
Add the following new experimental Overlord APIs:
/druid/indexer/v1/compaction/config/cluster/config/cluster/config/datasources/config/datasources/{dataSource}/config/datasources/{dataSource}/config/datasources/{dataSource}/history/status/datasources/status/datasources/{dataSource}This PR has: