Merge pull request #849 from metamx/default-coordinator-service-name

Default service names
This commit is contained in:
xvrl 2014-11-12 15:06:02 -08:00
commit 10b7ca9fa9
3 changed files with 11 additions and 4 deletions

View File

@ -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 = null;
private String coordinatorServiceName = DEFAULT_COORDINATOR_SERVICE_NAME;
@JsonProperty
@NotNull

View File

@ -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);

View File

@ -60,6 +60,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;
@ -90,7 +91,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);