Merge pull request #153 from metamx/gzip-compression

HTTP gzip compression support
This commit is contained in:
cheddar 2013-06-04 15:45:51 -07:00
commit 85ac8d43b6
4 changed files with 9 additions and 1 deletions

View File

@ -91,7 +91,6 @@
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>6.1.26</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>

View File

@ -58,6 +58,7 @@ import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.x.discovery.ServiceDiscovery;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.servlet.GzipFilter;
import org.skife.config.ConfigurationObjectFactory;
import java.util.List;
@ -214,6 +215,7 @@ public class BrokerNode extends QueryableNode<BrokerNode>
new ServletHolder(new QueryServlet(getJsonMapper(), getSmileMapper(), texasRanger, getEmitter(), getRequestLogger())),
"/druid/v2/*"
);
root.addFilter(GzipFilter.class, "/*", 0);
root.addEventListener(new GuiceServletConfig(injector));
root.addFilter(GuiceFilter.class, "/druid/v2/datasources/*", 0);

View File

@ -260,6 +260,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>6.1.26</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>

View File

@ -77,6 +77,7 @@ import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.DefaultServlet;
import org.mortbay.jetty.servlet.FilterHolder;
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.servlet.GzipFilter;
import org.skife.config.ConfigurationObjectFactory;
import org.skife.jdbi.v2.DBI;
@ -290,6 +291,7 @@ public class MasterMain
root.addServlet(new ServletHolder(new StatusServlet()), "/status");
root.addServlet(new ServletHolder(new DefaultServlet()), "/*");
root.addEventListener(new GuiceServletConfig(injector));
root.addFilter(GzipFilter.class, "/*", 0);
root.addFilter(
new FilterHolder(
new RedirectFilter(