You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kfaraz (via GitHub)" <gi...@apache.org> on 2023/08/22 08:11:22 UTC

[PR] Simplify DruidCoordinatorConfig and binding of metadata cleanup duties (druid)

kfaraz opened a new pull request, #14891:
URL: https://github.com/apache/druid/pull/14891

   ### Motivation
   - Simplify coordinator config handling
   - After #14695 , something similar needs to be done for `DruidCoordinatorConfig`. This change would help build towards that.
    
   ### Changes
   - Collect configs to enable metadata cleanup in `DruidCoordinatorConfig` itself rather than using optional binding in `CliCoordinator`
   - In the Coordinator style used by historical management duties, all the metadata cleanup duties are always instantiated but they run 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 avoid code duplication while reading and updating configs
   - Remove config update related methods from `CoordinatorCompactionConfig` and `CoordinatorDynamicConfig` as these are config classes and the business logic need not live there.
   - 
   
   ---
   
   This PR has:
   
   - [ ] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [x] 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](https://github.com/apache/druid/blob/master/dev/license.md)
   - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [x] been tested in a test Druid cluster.
   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Simplify DruidCoordinatorConfig and binding of metadata cleanup duties (druid)

Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz merged PR #14891:
URL: https://github.com/apache/druid/pull/14891


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Simplify DruidCoordinatorConfig and binding of metadata cleanup duties (druid)

Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on PR #14891:
URL: https://github.com/apache/druid/pull/14891#issuecomment-1716891053

   Thanks for the review, @clintropolis !!


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Simplify DruidCoordinatorConfig and binding of metadata cleanup duties (druid)

Posted by "clintropolis (via GitHub)" <gi...@apache.org>.
clintropolis commented on code in PR #14891:
URL: https://github.com/apache/druid/pull/14891#discussion_r1322395091


##########
services/src/main/java/org/apache/druid/cli/CliCoordinator.java:
##########
@@ -248,14 +240,7 @@ public void configure(Binder binder)
             LifecycleModule.register(binder, Server.class);
             LifecycleModule.register(binder, DataSourcesResource.class);
 
-            // Binding for Set of indexing service coordinator Duty
-            final ConditionalMultibind<CoordinatorDuty> conditionalIndexingServiceDutyMultibind = ConditionalMultibind.create(
-                properties,
-                binder,
-                CoordinatorDuty.class,
-                CoordinatorIndexingServiceDuty.class
-            );

Review Comment:
   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.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Simplify DruidCoordinatorConfig and binding of metadata cleanup duties (druid)

Posted by "clintropolis (via GitHub)" <gi...@apache.org>.
clintropolis commented on code in PR #14891:
URL: https://github.com/apache/druid/pull/14891#discussion_r1322530601


##########
services/src/main/java/org/apache/druid/cli/CliCoordinator.java:
##########
@@ -248,14 +240,7 @@ public void configure(Binder binder)
             LifecycleModule.register(binder, Server.class);
             LifecycleModule.register(binder, DataSourcesResource.class);
 
-            // Binding for Set of indexing service coordinator Duty
-            final ConditionalMultibind<CoordinatorDuty> conditionalIndexingServiceDutyMultibind = ConditionalMultibind.create(
-                properties,
-                binder,
-                CoordinatorDuty.class,
-                CoordinatorIndexingServiceDuty.class
-            );

Review Comment:
   oops, forgot about `CoordinatorCustomDuty`, carry on



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org