broker needs to announce itself in service discovery

This commit is contained in:
fjy 2013-09-18 09:23:46 -07:00
parent 64f3821b4e
commit f7df951610
1 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import com.metamx.common.logger.Logger;
import io.airlift.command.Command; import io.airlift.command.Command;
import io.druid.client.cache.CacheMonitor; import io.druid.client.cache.CacheMonitor;
import io.druid.curator.CuratorModule; import io.druid.curator.CuratorModule;
import io.druid.curator.discovery.DiscoveryModule;
import io.druid.guice.BrokerModule; import io.druid.guice.BrokerModule;
import io.druid.guice.HttpClientModule; import io.druid.guice.HttpClientModule;
import io.druid.guice.LifecycleModule; import io.druid.guice.LifecycleModule;
@ -32,6 +33,7 @@ import io.druid.guice.QueryableModule;
import io.druid.guice.ServerModule; import io.druid.guice.ServerModule;
import io.druid.guice.ServerViewModule; import io.druid.guice.ServerViewModule;
import io.druid.guice.annotations.Client; import io.druid.guice.annotations.Client;
import io.druid.guice.annotations.Self;
import io.druid.server.ClientQuerySegmentWalker; import io.druid.server.ClientQuerySegmentWalker;
import io.druid.server.StatusResource; import io.druid.server.StatusResource;
import io.druid.server.initialization.EmitterModule; import io.druid.server.initialization.EmitterModule;
@ -64,6 +66,7 @@ public class CliBroker extends ServerRunnable
HttpClientModule.global(), HttpClientModule.global(),
CuratorModule.class, CuratorModule.class,
new MetricsModule().register(CacheMonitor.class), new MetricsModule().register(CacheMonitor.class),
new DiscoveryModule().register(Self.class),
new ServerModule(), new ServerModule(),
new JettyServerModule(new QueryJettyServerInitializer()) new JettyServerModule(new QueryJettyServerInitializer())
.addResource(StatusResource.class), .addResource(StatusResource.class),