maytasm commented on a change in pull request #11601:
URL: https://github.com/apache/druid/pull/11601#discussion_r690361461
##########
File path: services/src/main/java/org/apache/druid/cli/CliCoordinator.java
##########
@@ -353,4 +370,76 @@ public static boolean isOverlord(Properties properties)
{
return Boolean.parseBoolean(properties.getProperty(AS_OVERLORD_PROPERTY));
}
+
+ private static class CoordinatorCustomDutyGroupsProvider implements
Provider<CoordinatorCustomDutyGroups>
+ {
+ private Properties props;
+ private JsonConfigurator configurator;
+ private ObjectMapper jsonMapper;
+
+ @Inject
+ public void inject(Properties props, JsonConfigurator configurator,
ObjectMapper jsonMapper)
+ {
+ this.props = props;
+ this.configurator = configurator;
+ this.jsonMapper = jsonMapper;
+ }
+
+ @Override
+ public CoordinatorCustomDutyGroups get()
Review comment:
There is no unit test since it is difficult to setup all the
modules/injectors. However, this is test in the Integration test. The
integration tests (`common-custom-coordinator-duties`) set the following
config:
```
druid.coordinator.dutyGroups=["cleanupMetadata"]
druid.coordinator.cleanupMetadata.duties=["killSupervisors"]
druid.coordinator.cleanupMetadata.duty.killSupervisors.retainDuration=PT0M
druid.coordinator.cleanupMetadata.period=PT10S
```
and verify that the custom "killSupervisors" is created correctly and does
its intended duty successfully.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]