From f7df9516101c5d6470846688889ec8e77b98e8ed Mon Sep 17 00:00:00 2001 From: fjy Date: Wed, 18 Sep 2013 09:23:46 -0700 Subject: [PATCH] broker needs to announce itself in service discovery --- services/src/main/java/io/druid/cli/CliBroker.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/src/main/java/io/druid/cli/CliBroker.java b/services/src/main/java/io/druid/cli/CliBroker.java index b88835e125b..23b8a00366d 100644 --- a/services/src/main/java/io/druid/cli/CliBroker.java +++ b/services/src/main/java/io/druid/cli/CliBroker.java @@ -24,6 +24,7 @@ import com.metamx.common.logger.Logger; import io.airlift.command.Command; import io.druid.client.cache.CacheMonitor; import io.druid.curator.CuratorModule; +import io.druid.curator.discovery.DiscoveryModule; import io.druid.guice.BrokerModule; import io.druid.guice.HttpClientModule; import io.druid.guice.LifecycleModule; @@ -32,6 +33,7 @@ import io.druid.guice.QueryableModule; import io.druid.guice.ServerModule; import io.druid.guice.ServerViewModule; import io.druid.guice.annotations.Client; +import io.druid.guice.annotations.Self; import io.druid.server.ClientQuerySegmentWalker; import io.druid.server.StatusResource; import io.druid.server.initialization.EmitterModule; @@ -64,6 +66,7 @@ public class CliBroker extends ServerRunnable HttpClientModule.global(), CuratorModule.class, new MetricsModule().register(CacheMonitor.class), + new DiscoveryModule().register(Self.class), new ServerModule(), new JettyServerModule(new QueryJettyServerInitializer()) .addResource(StatusResource.class),