fix worker config setup problems

This commit is contained in:
fjy 2013-12-09 18:25:29 -08:00
parent 8783007eb1
commit 303f6ff334
2 changed files with 4 additions and 1 deletions

View File

@ -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()
{ {

View File

@ -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",