Skip to content

Simplify DruidCoordinatorConfig and binding of metadata cleanup duties#14891

Merged
kfaraz merged 7 commits intoapache:masterfrom
kfaraz:simplify_coordinator_config
Sep 13, 2023
Merged

Simplify DruidCoordinatorConfig and binding of metadata cleanup duties#14891
kfaraz merged 7 commits intoapache:masterfrom
kfaraz:simplify_coordinator_config

Conversation

@kfaraz
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz commented Aug 22, 2023

Motivation

Changes

  • Move following configs from CliCoordinator to DruidCoordinatorConfig:
    • druid.coordinator.kill.on
    • druid.coordinator.kill.pendingSegments.on
    • druid.coordinator.kill.supervisors.on
    • druid.coordinator.kill.rules.on
    • druid.coordinator.kill.audit.on
    • druid.coordinator.kill.datasource.on
    • druid.coordinator.kill.compaction.on
  • In the Coordinator style used by historical management duties, always instantiate all the metadata cleanup duties but execute only if enabled. In the existing code, they are instantiated only when enabled by using optional binding with Guice.
  • Add a wrapper MetadataManager which contains handles to all the different metadata managers for rules, supervisors, segments, etc.
  • Add a CoordinatorConfigManager to simplify read and update of coordinator configs
  • Remove persistence related methods from CoordinatorCompactionConfig and CoordinatorDynamicConfig as these are config classes and persistence logic should not live here.
  • Remove annotations @CoordinatorIndexingServiceDuty, @CoordinatorMetadataStoreManagementDuty

Release Note

  • Druid extensions cannot bind custom coordinator duties to the duty groups IndexingServiceDuties and MetadataStoreManagementDuties anymore. These are meant to be core coordinator built-in flows and should not be affected by custom duties.
  • Users can still define a CustomCoordinatorDuty with a custom duty group and period.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@kfaraz kfaraz requested a review from clintropolis September 1, 2023 07:00
Comment on lines -252 to -257
final ConditionalMultibind<CoordinatorDuty> conditionalIndexingServiceDutyMultibind = ConditionalMultibind.create(
properties,
binder,
CoordinatorDuty.class,
CoordinatorIndexingServiceDuty.class
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean extensions can no longer provide custom coordinator duties? If so this might require a dev list thread to see if anyone is using this functionality.

It does make sense to update the built-in ones to be handled in a more direct manner, but I wonder if there is some way we could leave this stuff in place to retain this functionality as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, forgot about CoordinatorCustomDuty, carry on

@kfaraz kfaraz merged commit 286eeca into apache:master Sep 13, 2023
@kfaraz kfaraz deleted the simplify_coordinator_config branch September 13, 2023 03:37
@kfaraz
Copy link
Copy Markdown
Contributor Author

kfaraz commented Sep 13, 2023

Thanks for the review, @clintropolis !!

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.

3 participants