clintropolis commented on code in PR #13872:
URL: https://github.com/apache/druid/pull/13872#discussion_r1123736104
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/K8sOverlordModule.java:
##########
@@ -37,31 +41,42 @@
import org.apache.druid.tasklogs.TaskLogPusher;
import org.apache.druid.tasklogs.TaskLogs;
+import java.util.Set;
+
public class K8sOverlordModule implements DruidModule
{
+ private Set<NodeRole> nodeRoles;
+
+ @Inject
+ public void setNodeRoles(@Self Set<NodeRole> nodeRoles)
+ {
+ this.nodeRoles = nodeRoles;
+ }
@Override
public void configure(Binder binder)
{
- // druid.indexer.runner.type=k8s
- JsonConfigProvider.bind(binder,
IndexingServiceModuleHelper.INDEXER_RUNNER_PROPERTY_PREFIX,
KubernetesTaskRunnerConfig.class);
- JsonConfigProvider.bind(binder, "druid.indexer.queue",
TaskQueueConfig.class);
- PolyBind.createChoice(
- binder,
- "druid.indexer.runner.type",
- Key.get(TaskRunnerFactory.class),
- Key.get(KubernetesTaskRunnerFactory.class)
- );
- final MapBinder<String, TaskRunnerFactory> biddy = PolyBind.optionBinder(
- binder,
- Key.get(TaskRunnerFactory.class)
- );
+ if (SetUtils.emptyIfNull(nodeRoles).contains(NodeRole.OVERLORD)) {
Review Comment:
neat :+1:
--
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]