fix custom coordinator duty (#11641)

This commit is contained in:
Maytas Monsereenusorn 2021-08-31 14:04:00 +07:00 committed by GitHub
parent 6997fd787d
commit fc86a7a97f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -74,7 +74,8 @@ druid_request_logging_type=slf4j
druid_indexer_task_ignoreTimestampSpecForDruidInputSource=true
#Testing kill supervisor custom coordinator duty
druid.coordinator.dutyGroups=["cleanupMetadata"]
druid.coordinator.cleanupMetadata.duties=["killSupervisors"]
druid.coordinator.cleanupMetadata.duty.killSupervisors.retainDuration=PT0M
druid.coordinator.cleanupMetadata.period=PT10S
druid_coordinator_kill_supervisor_on=false
druid_coordinator_dutyGroups=["cleanupMetadata"]
druid_coordinator_cleanupMetadata_duties=["killSupervisors"]
druid_coordinator_cleanupMetadata_duty_killSupervisors_retainDuration=PT0M
druid_coordinator_cleanupMetadata_period=PT10S

View File

@ -435,7 +435,7 @@ public class CliCoordinator extends ServerRunnable
if (Strings.isNullOrEmpty(props.getProperty(groupPeriodPropKey))) {
throw new IAE("Run period for coordinator custom duty group must be set for group %s", coordinatorCustomDutyGroupName);
}
Duration groupPeriod = jsonMapper.readValue(props.getProperty(groupPeriodPropKey), Duration.class);
Duration groupPeriod = new Duration(props.getProperty(groupPeriodPropKey));
coordinatorCustomDutyGroups.add(new CoordinatorCustomDutyGroup(coordinatorCustomDutyGroupName, groupPeriod, coordinatorCustomDuties));
}
return new CoordinatorCustomDutyGroups(coordinatorCustomDutyGroups);