diff --git a/server/src/main/java/io/druid/server/initialization/jetty/ChatHandlerServerModule.java b/server/src/main/java/io/druid/server/initialization/jetty/ChatHandlerServerModule.java index 0acc6581339..7cf82b76488 100644 --- a/server/src/main/java/io/druid/server/initialization/jetty/ChatHandlerServerModule.java +++ b/server/src/main/java/io/druid/server/initialization/jetty/ChatHandlerServerModule.java @@ -20,7 +20,6 @@ package io.druid.server.initialization.jetty; import com.google.inject.Binder; -import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; @@ -48,8 +47,11 @@ public class ChatHandlerServerModule implements Module private static final String MAX_CHAT_REQUESTS_PROPERTY = "druid.indexer.server.maxChatRequests"; private static final String CHAT_PORT_PROPERTY = "druid.indexer.task.chathandler.port"; - @Inject - private Properties properties; + private final Properties properties; + + public ChatHandlerServerModule(Properties properties) { + this.properties = properties; + } @Override public void configure(Binder binder) diff --git a/services/src/main/java/io/druid/cli/CliPeon.java b/services/src/main/java/io/druid/cli/CliPeon.java index 3b9df97a6ec..6f82b3915a2 100644 --- a/services/src/main/java/io/druid/cli/CliPeon.java +++ b/services/src/main/java/io/druid/cli/CliPeon.java @@ -22,6 +22,7 @@ package io.druid.cli; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; import com.google.inject.Binder; +import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; @@ -85,6 +86,7 @@ import org.eclipse.jetty.server.Server; import java.io.File; import java.util.Arrays; import java.util.List; +import java.util.Properties; import java.util.Set; /** @@ -104,6 +106,9 @@ public class CliPeon extends GuiceRunnable private static final Logger log = new Logger(CliPeon.class); + @Inject + private Properties properties; + public CliPeon() { super(log); @@ -220,7 +225,7 @@ public class CliPeon extends GuiceRunnable } }, new IndexingServiceFirehoseModule(), - new ChatHandlerServerModule(), + new ChatHandlerServerModule(properties), new LookupModule() ); } diff --git a/services/src/main/java/io/druid/cli/CliRealtime.java b/services/src/main/java/io/druid/cli/CliRealtime.java index 3483296db56..d9fc7264217 100644 --- a/services/src/main/java/io/druid/cli/CliRealtime.java +++ b/services/src/main/java/io/druid/cli/CliRealtime.java @@ -21,6 +21,7 @@ package io.druid.cli; import com.google.common.collect.ImmutableList; import com.google.inject.Binder; +import com.google.inject.Inject; import com.google.inject.Module; import com.google.inject.name.Names; import com.metamx.common.logger.Logger; @@ -30,6 +31,7 @@ import io.druid.query.lookup.LookupModule; import io.druid.server.initialization.jetty.ChatHandlerServerModule; import java.util.List; +import java.util.Properties; /** */ @@ -41,6 +43,9 @@ public class CliRealtime extends ServerRunnable { private static final Logger log = new Logger(CliRealtime.class); + @Inject + private Properties properties; + public CliRealtime() { super(log); @@ -60,7 +65,7 @@ public class CliRealtime extends ServerRunnable binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8084); } }, - new ChatHandlerServerModule(), + new ChatHandlerServerModule(properties), new LookupModule() ); } diff --git a/services/src/main/java/io/druid/cli/CliRealtimeExample.java b/services/src/main/java/io/druid/cli/CliRealtimeExample.java index 47e850752f0..cca461caf0a 100644 --- a/services/src/main/java/io/druid/cli/CliRealtimeExample.java +++ b/services/src/main/java/io/druid/cli/CliRealtimeExample.java @@ -21,6 +21,7 @@ package io.druid.cli; import com.google.common.collect.ImmutableList; import com.google.inject.Binder; +import com.google.inject.Inject; import com.google.inject.Module; import com.google.inject.name.Names; import com.metamx.common.logger.Logger; @@ -39,6 +40,7 @@ import io.druid.timeline.DataSegment; import java.io.File; import java.io.IOException; import java.util.List; +import java.util.Properties; import java.util.concurrent.Executor; /** @@ -51,6 +53,9 @@ public class CliRealtimeExample extends ServerRunnable { private static final Logger log = new Logger(CliBroker.class); + @Inject + private Properties properties; + public CliRealtimeExample() { super(log); @@ -75,7 +80,7 @@ public class CliRealtimeExample extends ServerRunnable binder.bind(ServerView.class).to(NoopServerView.class).in(LazySingleton.class); } }, - new ChatHandlerServerModule(), + new ChatHandlerServerModule(properties), new LookupModule() ); }