From bbc5509078d86f9bc56a41a2bf021730c501cd2f Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Thu, 2 Jun 2016 22:33:12 -0700 Subject: [PATCH] Limit number of jetty threads that can be used by lookups (#3068) --- .../src/main/java/io/druid/query/lookup/LookupModule.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/main/java/io/druid/query/lookup/LookupModule.java b/server/src/main/java/io/druid/query/lookup/LookupModule.java index ddb4d2906c0..cfd98a40923 100644 --- a/server/src/main/java/io/druid/query/lookup/LookupModule.java +++ b/server/src/main/java/io/druid/query/lookup/LookupModule.java @@ -47,6 +47,7 @@ import io.druid.guice.annotations.Smile; import io.druid.initialization.DruidModule; import io.druid.server.DruidNode; import io.druid.server.initialization.ZkPathsConfig; +import io.druid.server.initialization.jetty.JettyBindings; import io.druid.server.listener.announcer.ListenerResourceAnnouncer; import io.druid.server.listener.announcer.ListeningAnnouncerConfig; import io.druid.server.listener.resource.AbstractListenerHandler; @@ -88,6 +89,11 @@ public class LookupModule implements DruidModule LifecycleModule.register(binder, LookupResourceListenerAnnouncer.class); // Nothing else starts this, so we bind it to get it to start binder.bind(LookupResourceListenerAnnouncer.class).in(ManageLifecycle.class); + JettyBindings.addQosFilter( + binder, + ListenerResource.BASE_PATH + "/" + LookupCoordinatorManager.LOOKUP_LISTEN_ANNOUNCE_KEY, + 2 // 1 for "normal" operation and 1 for "emergency" or other + ); } }