Skip to content

[Backport] Cleanup Coordinator logs, add duty status API (#16959)#17154

Merged
abhishekagarwal87 merged 1 commit intoapache:31.0.0from
kfaraz:backport_16959
Sep 25, 2024
Merged

[Backport] Cleanup Coordinator logs, add duty status API (#16959)#17154
abhishekagarwal87 merged 1 commit intoapache:31.0.0from
kfaraz:backport_16959

Conversation

@kfaraz
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz commented Sep 25, 2024

Backport #16959

Description
-----------
Coordinator logs are fairly noisy and don't give much useful information (see example below).
Even when the Coordinator misbehaves, these logs are not very useful.

Main changes
------------
- Add API `GET /druid/coordinator/v1/duties` that returns a status list of all duty groups currently running on the Coordinator
- Emit metrics `segment/poll/time`, `segment/pollWithSchema/time`, `segment/buildSnapshot/time`
- Remove redundant logs that indicate normal operation of well-tested aspects of the Coordinator

Refactors
---------
- Move some logic from `DutiesRunnable` to `CoordinatorDutyGroup`
- Move stats collection from `CollectSegmentAndServerStats` to `PrepareBalancerAndLoadQueues`
- Minor cleanup of class `DruidCoordinator`
- Clean up class `DruidCoordinatorRuntimeParams`
  - Remove field `coordinatorStartTime`. Maintain start time in `MarkOvershadowedSegmentsAsUnused` instead.
  - Remove field `MetadataRuleManager`. Pass supplier to constructor of applicable duties instead.
  - Make `usedSegmentsNewestFirst` and `datasourcesSnapshot` as non-nullable as they are always required.
@abhishekagarwal87 abhishekagarwal87 merged commit 8059b86 into apache:31.0.0 Sep 25, 2024
@kfaraz kfaraz deleted the backport_16959 branch September 25, 2024 09:33
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants