diff --git a/indexing-service/src/main/java/io/druid/indexing/worker/config/WorkerConfig.java b/indexing-service/src/main/java/io/druid/indexing/worker/config/WorkerConfig.java index d510df4c3ee..567dd62aa1f 100644 --- a/indexing-service/src/main/java/io/druid/indexing/worker/config/WorkerConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/config/WorkerConfig.java @@ -38,7 +38,7 @@ public class WorkerConfig @JsonProperty @Min(1) - private int capacity = Runtime.getRuntime().availableProcessors() - 1; + private int capacity = Math.max(1, Runtime.getRuntime().availableProcessors() - 1); public String getIp() { diff --git a/services/src/main/java/io/druid/cli/CliOverlord.java b/services/src/main/java/io/druid/cli/CliOverlord.java index c0a2d14b54c..c067f57711f 100644 --- a/services/src/main/java/io/druid/cli/CliOverlord.java +++ b/services/src/main/java/io/druid/cli/CliOverlord.java @@ -70,6 +70,7 @@ import io.druid.indexing.overlord.scaling.ResourceManagementStrategy; import io.druid.indexing.overlord.scaling.SimpleResourceManagementConfig; import io.druid.indexing.overlord.scaling.SimpleResourceManagementStrategy; import io.druid.indexing.overlord.setup.WorkerSetupData; +import io.druid.indexing.worker.config.WorkerConfig; import io.druid.server.http.RedirectFilter; import io.druid.server.http.RedirectInfo; import io.druid.server.initialization.JettyServerInitializer; @@ -166,6 +167,8 @@ public class CliOverlord extends ServerRunnable private void configureRunners(Binder binder) { + JsonConfigProvider.bind(binder, "druid.worker", WorkerConfig.class); + PolyBind.createChoice( binder, "druid.indexer.runner.type",