mirror of https://github.com/apache/druid.git
Merge pull request #153 from metamx/gzip-compression
HTTP gzip compression support
This commit is contained in:
commit
85ac8d43b6
|
@ -91,7 +91,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>jetty-util</artifactId>
|
<artifactId>jetty-util</artifactId>
|
||||||
<version>6.1.26</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
|
|
|
@ -58,6 +58,7 @@ import org.apache.curator.framework.CuratorFramework;
|
||||||
import org.apache.curator.x.discovery.ServiceDiscovery;
|
import org.apache.curator.x.discovery.ServiceDiscovery;
|
||||||
import org.mortbay.jetty.servlet.Context;
|
import org.mortbay.jetty.servlet.Context;
|
||||||
import org.mortbay.jetty.servlet.ServletHolder;
|
import org.mortbay.jetty.servlet.ServletHolder;
|
||||||
|
import org.mortbay.servlet.GzipFilter;
|
||||||
import org.skife.config.ConfigurationObjectFactory;
|
import org.skife.config.ConfigurationObjectFactory;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -214,6 +215,7 @@ public class BrokerNode extends QueryableNode<BrokerNode>
|
||||||
new ServletHolder(new QueryServlet(getJsonMapper(), getSmileMapper(), texasRanger, getEmitter(), getRequestLogger())),
|
new ServletHolder(new QueryServlet(getJsonMapper(), getSmileMapper(), texasRanger, getEmitter(), getRequestLogger())),
|
||||||
"/druid/v2/*"
|
"/druid/v2/*"
|
||||||
);
|
);
|
||||||
|
root.addFilter(GzipFilter.class, "/*", 0);
|
||||||
|
|
||||||
root.addEventListener(new GuiceServletConfig(injector));
|
root.addEventListener(new GuiceServletConfig(injector));
|
||||||
root.addFilter(GuiceFilter.class, "/druid/v2/datasources/*", 0);
|
root.addFilter(GuiceFilter.class, "/druid/v2/datasources/*", 0);
|
||||||
|
|
5
pom.xml
5
pom.xml
|
@ -260,6 +260,11 @@
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
|
<artifactId>jetty-util</artifactId>
|
||||||
|
<version>6.1.26</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>joda-time</groupId>
|
<groupId>joda-time</groupId>
|
||||||
<artifactId>joda-time</artifactId>
|
<artifactId>joda-time</artifactId>
|
||||||
|
|
|
@ -77,6 +77,7 @@ import org.mortbay.jetty.servlet.Context;
|
||||||
import org.mortbay.jetty.servlet.DefaultServlet;
|
import org.mortbay.jetty.servlet.DefaultServlet;
|
||||||
import org.mortbay.jetty.servlet.FilterHolder;
|
import org.mortbay.jetty.servlet.FilterHolder;
|
||||||
import org.mortbay.jetty.servlet.ServletHolder;
|
import org.mortbay.jetty.servlet.ServletHolder;
|
||||||
|
import org.mortbay.servlet.GzipFilter;
|
||||||
import org.skife.config.ConfigurationObjectFactory;
|
import org.skife.config.ConfigurationObjectFactory;
|
||||||
import org.skife.jdbi.v2.DBI;
|
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 StatusServlet()), "/status");
|
||||||
root.addServlet(new ServletHolder(new DefaultServlet()), "/*");
|
root.addServlet(new ServletHolder(new DefaultServlet()), "/*");
|
||||||
root.addEventListener(new GuiceServletConfig(injector));
|
root.addEventListener(new GuiceServletConfig(injector));
|
||||||
|
root.addFilter(GzipFilter.class, "/*", 0);
|
||||||
root.addFilter(
|
root.addFilter(
|
||||||
new FilterHolder(
|
new FilterHolder(
|
||||||
new RedirectFilter(
|
new RedirectFilter(
|
||||||
|
|
Loading…
Reference in New Issue