mirror of https://github.com/apache/druid.git
add broker default and define constants
This commit is contained in:
parent
42a61290a8
commit
3a9def7fb1
|
@ -34,9 +34,12 @@ import java.util.List;
|
|||
*/
|
||||
public class TieredBrokerConfig
|
||||
{
|
||||
public static final String DEFAULT_COORDINATOR_SERVICE_NAME = "druid/coordinator";
|
||||
public static final String DEFAULT_BROKER_SERVICE_NAME = "druid/broker";
|
||||
|
||||
@JsonProperty
|
||||
@NotNull
|
||||
private String defaultBrokerServiceName = "";
|
||||
private String defaultBrokerServiceName = DEFAULT_BROKER_SERVICE_NAME;
|
||||
|
||||
@JsonProperty
|
||||
private LinkedHashMap<String, String> tierToBrokerMap;
|
||||
|
@ -51,7 +54,7 @@ public class TieredBrokerConfig
|
|||
|
||||
@JsonProperty
|
||||
@NotNull
|
||||
private String coordinatorServiceName = "druid/coordinator";
|
||||
private String coordinatorServiceName = DEFAULT_COORDINATOR_SERVICE_NAME;
|
||||
|
||||
@JsonProperty
|
||||
@NotNull
|
||||
|
|
|
@ -50,6 +50,7 @@ import io.druid.server.QueryResource;
|
|||
import io.druid.server.coordination.broker.DruidBroker;
|
||||
import io.druid.server.initialization.JettyServerInitializer;
|
||||
import io.druid.server.metrics.MetricsModule;
|
||||
import io.druid.server.router.TieredBrokerConfig;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -78,7 +79,9 @@ public class CliBroker extends ServerRunnable
|
|||
@Override
|
||||
public void configure(Binder binder)
|
||||
{
|
||||
binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/broker");
|
||||
binder.bindConstant().annotatedWith(Names.named("serviceName")).to(
|
||||
TieredBrokerConfig.DEFAULT_BROKER_SERVICE_NAME
|
||||
);
|
||||
binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8082);
|
||||
|
||||
binder.bind(QueryToolChestWarehouse.class).to(MapQueryToolChestWarehouse.class);
|
||||
|
|
|
@ -58,6 +58,7 @@ import io.druid.server.http.RulesResource;
|
|||
import io.druid.server.http.ServersResource;
|
||||
import io.druid.server.http.TiersResource;
|
||||
import io.druid.server.initialization.JettyServerInitializer;
|
||||
import io.druid.server.router.TieredBrokerConfig;
|
||||
import org.apache.curator.framework.CuratorFramework;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class CliCoordinator extends ServerRunnable
|
|||
@Override
|
||||
public void configure(Binder binder)
|
||||
{
|
||||
binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/coordinator");
|
||||
binder.bindConstant().annotatedWith(Names.named("serviceName")).to(TieredBrokerConfig.DEFAULT_COORDINATOR_SERVICE_NAME);
|
||||
binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8081);
|
||||
|
||||
ConfigProvider.bind(binder, DruidCoordinatorConfig.class);
|
||||
|
|
Loading…
Reference in New Issue