mirror of https://github.com/apache/druid.git
fix worker config setup problems
This commit is contained in:
parent
8783007eb1
commit
303f6ff334
|
@ -38,7 +38,7 @@ public class WorkerConfig
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@Min(1)
|
@Min(1)
|
||||||
private int capacity = Runtime.getRuntime().availableProcessors() - 1;
|
private int capacity = Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
|
||||||
|
|
||||||
public String getIp()
|
public String getIp()
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,6 +70,7 @@ import io.druid.indexing.overlord.scaling.ResourceManagementStrategy;
|
||||||
import io.druid.indexing.overlord.scaling.SimpleResourceManagementConfig;
|
import io.druid.indexing.overlord.scaling.SimpleResourceManagementConfig;
|
||||||
import io.druid.indexing.overlord.scaling.SimpleResourceManagementStrategy;
|
import io.druid.indexing.overlord.scaling.SimpleResourceManagementStrategy;
|
||||||
import io.druid.indexing.overlord.setup.WorkerSetupData;
|
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.RedirectFilter;
|
||||||
import io.druid.server.http.RedirectInfo;
|
import io.druid.server.http.RedirectInfo;
|
||||||
import io.druid.server.initialization.JettyServerInitializer;
|
import io.druid.server.initialization.JettyServerInitializer;
|
||||||
|
@ -166,6 +167,8 @@ public class CliOverlord extends ServerRunnable
|
||||||
|
|
||||||
private void configureRunners(Binder binder)
|
private void configureRunners(Binder binder)
|
||||||
{
|
{
|
||||||
|
JsonConfigProvider.bind(binder, "druid.worker", WorkerConfig.class);
|
||||||
|
|
||||||
PolyBind.createChoice(
|
PolyBind.createChoice(
|
||||||
binder,
|
binder,
|
||||||
"druid.indexer.runner.type",
|
"druid.indexer.runner.type",
|
||||||
|
|
Loading…
Reference in New Issue