diff --git a/README b/README
index cb1ec84a8ab..c976deda70b 100644
--- a/README
+++ b/README
@@ -1,6 +1,7 @@
-See the "Wiki" https://github.com/metamx/druid/wiki
+The best place for more Druid resources is at: http://www.druid.io
+
+Looking for docs? http://druid.io/docs/latest/
Build with build.sh
-See examples/rand
-See examples/twitter
+Want to get started? http://druid.io/docs/latest/Tutorial:-A-First-Look-at-Druid.html
diff --git a/build.sh b/build.sh
index d5232c7934b..856376deca1 100755
--- a/build.sh
+++ b/build.sh
@@ -30,4 +30,4 @@ echo "For examples, see: "
echo " "
ls -1 examples/*/*sh
echo " "
-echo "See also http://druid.io/docs/0.6.20"
+echo "See also http://druid.io/docs/0.6.23"
diff --git a/cassandra-storage/pom.xml b/cassandra-storage/pom.xml
index 9175e18f34e..8a4a9f6278e 100644
--- a/cassandra-storage/pom.xml
+++ b/cassandra-storage/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/common/pom.xml b/common/pom.xml
index eacc32978f2..7b15f631fc8 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/docs/content/Booting-a-production-cluster.md b/docs/content/Booting-a-production-cluster.md
index 18adfb77679..7d670b9ee2c 100644
--- a/docs/content/Booting-a-production-cluster.md
+++ b/docs/content/Booting-a-production-cluster.md
@@ -3,7 +3,7 @@ layout: doc_page
---
# Booting a Single Node Cluster #
-[Loading Your Data](Tutorial%3A-Loading-Your-Data-Part-2.html) and [All About Queries](Tutorial%3A-All-About-Queries.html) contain recipes to boot a small druid cluster on localhost. Here we will boot a small cluster on EC2. You can checkout the code, or download a tarball from [here](http://static.druid.io/artifacts/druid-services-0.6.20-bin.tar.gz).
+[Loading Your Data](Tutorial%3A-Loading-Your-Data-Part-2.html) and [All About Queries](Tutorial%3A-All-About-Queries.html) contain recipes to boot a small druid cluster on localhost. Here we will boot a small cluster on EC2. You can checkout the code, or download a tarball from [here](http://static.druid.io/artifacts/druid-services-0.6.23-bin.tar.gz).
The [ec2 run script](https://github.com/metamx/druid/blob/master/examples/bin/run_ec2.sh), run_ec2.sh, is located at 'examples/bin' if you have checked out the code, or at the root of the project if you've downloaded a tarball. The scripts rely on the [Amazon EC2 API Tools](http://aws.amazon.com/developertools/351), and you will need to set three environment variables:
diff --git a/docs/content/Examples.md b/docs/content/Examples.md
index e7b6bd3f3c8..65fa7444aaf 100644
--- a/docs/content/Examples.md
+++ b/docs/content/Examples.md
@@ -19,13 +19,13 @@ Clone Druid and build it:
git clone https://github.com/metamx/druid.git druid
cd druid
git fetch --tags
-git checkout druid-0.6.20
+git checkout druid-0.6.23
./build.sh
```
### Downloading the DSK (Druid Standalone Kit)
-[Download](http://static.druid.io/artifacts/releases/druid-services-0.6.20-bin.tar.gz) a stand-alone tarball and run it:
+[Download](http://static.druid.io/artifacts/releases/druid-services-0.6.23-bin.tar.gz) a stand-alone tarball and run it:
``` bash
tar -xzf druid-services-0.X.X-bin.tar.gz
diff --git a/docs/content/Modules.md b/docs/content/Modules.md
index 1641f4df5e2..4345219db0b 100644
--- a/docs/content/Modules.md
+++ b/docs/content/Modules.md
@@ -54,6 +54,7 @@ Druid's extensions leverage Guice in order to add things at runtime. Basically,
1. Add Aggregators
1. Add Complex metrics
1. Add new Query types
+1. Add new Jersey resources
Extensions are added to the system via an implementation of `io.druid.initialization.DruidModule`.
@@ -157,3 +158,10 @@ DruidBinders.queryRunnerFactoryBinder(binder)
The first one binds the SegmentMetadataQueryQueryToolChest for usage when a SegmentMetadataQuery is used. The second one does the same thing but for the QueryRunnerFactory instead.
+#### Adding new Jersey resources
+
+Adding new Jersey resources to a module requires calling the following code to bind the resource in the module:
+
+```java
+Jerseys.addResource(binder, NewResource.class);
+```
\ No newline at end of file
diff --git a/docs/content/Realtime.md b/docs/content/Realtime.md
index 3d6370551bd..676438f75d3 100644
--- a/docs/content/Realtime.md
+++ b/docs/content/Realtime.md
@@ -27,7 +27,7 @@ druid.host=localhost
druid.service=realtime
druid.port=8083
-druid.extensions.coordinates=["io.druid.extensions:druid-kafka-seven:0.6.20"]
+druid.extensions.coordinates=["io.druid.extensions:druid-kafka-seven:0.6.23"]
druid.zk.service.host=localhost
diff --git a/docs/content/Tutorial:-A-First-Look-at-Druid.md b/docs/content/Tutorial:-A-First-Look-at-Druid.md
index 451c0414731..ee8ceba5122 100644
--- a/docs/content/Tutorial:-A-First-Look-at-Druid.md
+++ b/docs/content/Tutorial:-A-First-Look-at-Druid.md
@@ -47,7 +47,7 @@ There are two ways to setup Druid: download a tarball, or [Build From Source](Bu
### Download a Tarball
-We've built a tarball that contains everything you'll need. You'll find it [here](http://static.druid.io/artifacts/releases/druid-services-0.6.20-bin.tar.gz). Download this file to a directory of your choosing.
+We've built a tarball that contains everything you'll need. You'll find it [here](http://static.druid.io/artifacts/releases/druid-services-0.6.23-bin.tar.gz). Download this file to a directory of your choosing.
You can extract the awesomeness within by issuing:
@@ -58,7 +58,7 @@ tar -zxvf druid-services-*-bin.tar.gz
Not too lost so far right? That's great! If you cd into the directory:
```
-cd druid-services-0.6.20
+cd druid-services-0.6.23
```
You should see a bunch of files:
diff --git a/docs/content/Tutorial:-Loading-Your-Data-Part-2.md b/docs/content/Tutorial:-Loading-Your-Data-Part-2.md
index b2d4e8bf873..6f3e3144df3 100644
--- a/docs/content/Tutorial:-Loading-Your-Data-Part-2.md
+++ b/docs/content/Tutorial:-Loading-Your-Data-Part-2.md
@@ -42,7 +42,7 @@ With real-world data, we recommend having a message bus such as [Apache Kafka](h
#### Setting up Kafka
-[KafkaFirehoseFactory](https://github.com/metamx/druid/blob/druid-0.6.20/realtime/src/main/java/com/metamx/druid/realtime/firehose/KafkaFirehoseFactory.java) is how druid communicates with Kafka. Using this [Firehose](Firehose.html) with the right configuration, we can import data into Druid in real-time without writing any code. To load data to a real-time node via Kafka, we'll first need to initialize Zookeeper and Kafka, and then configure and initialize a [Realtime](Realtime.html) node.
+[KafkaFirehoseFactory](https://github.com/metamx/druid/blob/druid-0.6.23/realtime/src/main/java/com/metamx/druid/realtime/firehose/KafkaFirehoseFactory.java) is how druid communicates with Kafka. Using this [Firehose](Firehose.html) with the right configuration, we can import data into Druid in real-time without writing any code. To load data to a real-time node via Kafka, we'll first need to initialize Zookeeper and Kafka, and then configure and initialize a [Realtime](Realtime.html) node.
Instructions for booting a Zookeeper and then Kafka cluster are available [here](http://kafka.apache.org/07/quickstart.html).
diff --git a/docs/content/Tutorial:-The-Druid-Cluster.md b/docs/content/Tutorial:-The-Druid-Cluster.md
index 92d40ed4928..c00d882db31 100644
--- a/docs/content/Tutorial:-The-Druid-Cluster.md
+++ b/docs/content/Tutorial:-The-Druid-Cluster.md
@@ -11,7 +11,7 @@ In this tutorial, we will set up other types of Druid nodes as well as and exter
If you followed the first tutorial, you should already have Druid downloaded. If not, let's go back and do that first.
-You can download the latest version of druid [here](http://static.druid.io/artifacts/releases/druid-services-0.6.20-bin.tar.gz)
+You can download the latest version of druid [here](http://static.druid.io/artifacts/releases/druid-services-0.6.23-bin.tar.gz)
and untar the contents within by issuing:
@@ -147,7 +147,7 @@ druid.port=8081
druid.zk.service.host=localhost
-druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.20"]
+druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.23"]
# Dummy read only AWS account (used to download example data)
druid.s3.secretKey=QyyfVZ7llSiRg6Qcrql1eEUG7buFpAK6T6engr1b
@@ -237,7 +237,7 @@ druid.port=8083
druid.zk.service.host=localhost
-druid.extensions.coordinates=["io.druid.extensions:druid-examples:0.6.20-SNAPSHOT"]
+druid.extensions.coordinates=["io.druid.extensions:druid-examples:0.6.23-SNAPSHOT"]
druid.db.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid
druid.db.connector.user=druid
diff --git a/docs/content/Tutorial:-Webstream.md b/docs/content/Tutorial:-Webstream.md
index 2f427cd33fe..55a6005edf5 100644
--- a/docs/content/Tutorial:-Webstream.md
+++ b/docs/content/Tutorial:-Webstream.md
@@ -37,7 +37,7 @@ There are two ways to setup Druid: download a tarball, or [Build From Source](Bu
h3. Download a Tarball
-We've built a tarball that contains everything you'll need. You'll find it [here](http://static.druid.io/artifacts/releases/druid-services-0.6.20-bin.tar.gz)
+We've built a tarball that contains everything you'll need. You'll find it [here](http://static.druid.io/artifacts/releases/druid-services-0.6.23-bin.tar.gz)
Download this file to a directory of your choosing.
You can extract the awesomeness within by issuing:
@@ -48,7 +48,7 @@ tar zxvf druid-services-*-bin.tar.gz
Not too lost so far right? That's great! If you cd into the directory:
```
-cd druid-services-0.6.20
+cd druid-services-0.6.23
```
You should see a bunch of files:
diff --git a/docs/content/Twitter-Tutorial.textile b/docs/content/Twitter-Tutorial.textile
index 00b9186cfb0..9abbeb702ec 100644
--- a/docs/content/Twitter-Tutorial.textile
+++ b/docs/content/Twitter-Tutorial.textile
@@ -9,7 +9,7 @@ There are two ways to setup Druid: download a tarball, or build it from source.
h3. Download a Tarball
-We've built a tarball that contains everything you'll need. You'll find it "here":http://static.druid.io/artifacts/releases/druid-services-0.6.20-bin.tar.gz.
+We've built a tarball that contains everything you'll need. You'll find it "here":http://static.druid.io/artifacts/releases/druid-services-0.6.23-bin.tar.gz.
Download this bad boy to a directory of your choosing.
You can extract the awesomeness within by issuing:
diff --git a/examples/config/historical/runtime.properties b/examples/config/historical/runtime.properties
index bf4eff0a013..9b942e0e392 100644
--- a/examples/config/historical/runtime.properties
+++ b/examples/config/historical/runtime.properties
@@ -4,7 +4,7 @@ druid.port=8081
druid.zk.service.host=localhost
-druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.20"]
+druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.23"]
# Dummy read only AWS account (used to download example data)
druid.s3.secretKey=QyyfVZ7llSiRg6Qcrql1eEUG7buFpAK6T6engr1b
diff --git a/examples/config/realtime/runtime.properties b/examples/config/realtime/runtime.properties
index df58ea3d406..6f3ce236bf5 100644
--- a/examples/config/realtime/runtime.properties
+++ b/examples/config/realtime/runtime.properties
@@ -4,7 +4,7 @@ druid.port=8083
druid.zk.service.host=localhost
-druid.extensions.coordinates=["io.druid.extensions:druid-examples:0.6.20","io.druid.extensions:druid-kafka-seven:0.6.20"]
+druid.extensions.coordinates=["io.druid.extensions:druid-examples:0.6.23","io.druid.extensions:druid-kafka-seven:0.6.23"]
druid.db.connector.connectURI=jdbc\:mysql\://localhost\:3306/druid
druid.db.connector.user=druid
diff --git a/examples/pom.xml b/examples/pom.xml
index 55f63e73533..3ef0caaa856 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/hdfs-storage/pom.xml b/hdfs-storage/pom.xml
index d26a8ee4984..af3eb2a4140 100644
--- a/hdfs-storage/pom.xml
+++ b/hdfs-storage/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/indexing-hadoop/pom.xml b/indexing-hadoop/pom.xml
index 17f27c45cc7..1278df33166 100644
--- a/indexing-hadoop/pom.xml
+++ b/indexing-hadoop/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/indexing-service/pom.xml b/indexing-service/pom.xml
index d151c81c3c7..33361b66f2c 100644
--- a/indexing-service/pom.xml
+++ b/indexing-service/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/kafka-eight/pom.xml b/kafka-eight/pom.xml
index 7436c70f439..53601c90cee 100644
--- a/kafka-eight/pom.xml
+++ b/kafka-eight/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/kafka-seven/pom.xml b/kafka-seven/pom.xml
index 94125e73737..f00bdea925a 100644
--- a/kafka-seven/pom.xml
+++ b/kafka-seven/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/pom.xml b/pom.xml
index e87f87205f4..6ffc748e338 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
io.druid
druid
pom
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
druid
druid
@@ -77,7 +77,7 @@
com.metamx
http-client
- 0.8.1
+ 0.8.4
com.metamx
diff --git a/processing/pom.xml b/processing/pom.xml
index b55c92e224a..a58ffad72fc 100644
--- a/processing/pom.xml
+++ b/processing/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/rabbitmq/pom.xml b/rabbitmq/pom.xml
index 9e3a63cbf0a..38f8c654504 100644
--- a/rabbitmq/pom.xml
+++ b/rabbitmq/pom.xml
@@ -11,7 +11,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/s3-extensions/pom.xml b/s3-extensions/pom.xml
index de24a7b684a..93e0844925b 100644
--- a/s3-extensions/pom.xml
+++ b/s3-extensions/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/server/pom.xml b/server/pom.xml
index 51bfa347755..38da68ee1d2 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -28,7 +28,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/server/src/main/java/io/druid/guice/QueryableModule.java b/server/src/main/java/io/druid/guice/QueryableModule.java
index 4a279e57d87..f8c4259e33f 100644
--- a/server/src/main/java/io/druid/guice/QueryableModule.java
+++ b/server/src/main/java/io/druid/guice/QueryableModule.java
@@ -25,7 +25,6 @@ import com.google.inject.Binder;
import com.google.inject.util.Providers;
import io.druid.initialization.DruidModule;
import io.druid.query.QuerySegmentWalker;
-import io.druid.server.QueryServlet;
import io.druid.server.log.EmittingRequestLoggerProvider;
import io.druid.server.log.FileRequestLoggerProvider;
import io.druid.server.log.RequestLogger;
@@ -41,7 +40,6 @@ public class QueryableModule implements DruidModule
@Override
public void configure(Binder binder)
{
- binder.bind(QueryServlet.class).in(LazySingleton.class);
binder.bind(QuerySegmentWalker.class).toProvider(Providers.of(null));
binder.bind(RequestLogger.class).toProvider(RequestLoggerProvider.class).in(ManageLifecycle.class);
JsonConfigProvider.bind(binder, "druid.request.logging", RequestLoggerProvider.class);
diff --git a/server/src/main/java/io/druid/server/QueryServlet.java b/server/src/main/java/io/druid/server/QueryResource.java
similarity index 90%
rename from server/src/main/java/io/druid/server/QueryServlet.java
rename to server/src/main/java/io/druid/server/QueryResource.java
index 53a5b17a260..cbd388a9304 100644
--- a/server/src/main/java/io/druid/server/QueryServlet.java
+++ b/server/src/main/java/io/druid/server/QueryResource.java
@@ -37,22 +37,25 @@ import io.druid.guice.annotations.Smile;
import io.druid.query.Query;
import io.druid.query.QuerySegmentWalker;
import io.druid.server.log.RequestLogger;
-import org.eclipse.jetty.server.Request;
import org.joda.time.DateTime;
import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
/**
*/
-public class QueryServlet extends HttpServlet
+@Path("/druid/v2/")
+public class QueryResource
{
- private static final Logger log = new Logger(QueryServlet.class);
+ private static final Logger log = new Logger(QueryResource.class);
private static final Charset UTF8 = Charset.forName("UTF-8");
private final ObjectMapper jsonMapper;
@@ -62,7 +65,7 @@ public class QueryServlet extends HttpServlet
private final RequestLogger requestLogger;
@Inject
- public QueryServlet(
+ public QueryResource(
@Json ObjectMapper jsonMapper,
@Smile ObjectMapper smileMapper,
QuerySegmentWalker texasRanger,
@@ -77,8 +80,12 @@ public class QueryServlet extends HttpServlet
this.requestLogger = requestLogger;
}
- @Override
- protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ @POST
+ @Produces("application/json")
+ public void doPost(
+ @Context HttpServletRequest req,
+ @Context HttpServletResponse resp
+ ) throws ServletException, IOException
{
Query query = null;
byte[] requestQuery = null;
@@ -111,7 +118,7 @@ public class QueryServlet extends HttpServlet
out = resp.getOutputStream();
jsonWriter.writeValue(out, results);
- long requestTime = System.currentTimeMillis() - ((Request) req).getTimeStamp();
+ long requestTime = System.currentTimeMillis() - req.getSession().getCreationTime();
emitter.emit(
new ServiceMetricEvent.Builder()
diff --git a/services/pom.xml b/services/pom.xml
index 5af12cfd125..cf0f4d41d2c 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -27,7 +27,7 @@
io.druid
druid
- 0.6.21-SNAPSHOT
+ 0.6.24-SNAPSHOT
diff --git a/services/src/main/java/io/druid/cli/BrokerJettyServerInitializer.java b/services/src/main/java/io/druid/cli/BrokerJettyServerInitializer.java
deleted file mode 100644
index 08610018e19..00000000000
--- a/services/src/main/java/io/druid/cli/BrokerJettyServerInitializer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Druid - a distributed column store.
- * Copyright (C) 2012, 2013 Metamarkets Group Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package io.druid.cli;
-
-import com.google.inject.Injector;
-import com.google.inject.servlet.GuiceFilter;
-import io.druid.server.QueryServlet;
-import io.druid.server.initialization.JettyServerInitializer;
-import org.eclipse.jetty.server.Handler;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.DefaultHandler;
-import org.eclipse.jetty.server.handler.HandlerList;
-import org.eclipse.jetty.servlet.DefaultServlet;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.servlets.GzipFilter;
-
-/**
- */
-public class BrokerJettyServerInitializer implements JettyServerInitializer
-{
- @Override
- public void initialize(Server server, Injector injector)
- {
- final ServletContextHandler resources = new ServletContextHandler(ServletContextHandler.SESSIONS);
- resources.addServlet(new ServletHolder(new DefaultServlet()), "/druid/v2/datasources/*");
- resources.addFilter(GuiceFilter.class, "/druid/v2/datasources/*", null);
-
- final ServletContextHandler queries = new ServletContextHandler(ServletContextHandler.SESSIONS);
- queries.setResourceBase("/");
- queries.addServlet(new ServletHolder(injector.getInstance(QueryServlet.class)), "/druid/v2/*");
-
- final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);
- root.addServlet(new ServletHolder(new DefaultServlet()), "/*");
- root.addFilter(GzipFilter.class, "/*", null);
- root.addFilter(GuiceFilter.class, "/*", null);
-
- final HandlerList handlerList = new HandlerList();
- handlerList.setHandlers(new Handler[]{resources, queries, root, new DefaultHandler()});
- server.setHandler(handlerList);
- }
-}
diff --git a/services/src/main/java/io/druid/cli/CliBroker.java b/services/src/main/java/io/druid/cli/CliBroker.java
index cf66da0cece..aa215af876e 100644
--- a/services/src/main/java/io/druid/cli/CliBroker.java
+++ b/services/src/main/java/io/druid/cli/CliBroker.java
@@ -42,6 +42,7 @@ import io.druid.query.QuerySegmentWalker;
import io.druid.query.QueryToolChestWarehouse;
import io.druid.server.ClientInfoResource;
import io.druid.server.ClientQuerySegmentWalker;
+import io.druid.server.QueryResource;
import io.druid.server.initialization.JettyServerInitializer;
import io.druid.server.metrics.MetricsModule;
import org.eclipse.jetty.server.Server;
@@ -52,7 +53,7 @@ import java.util.List;
*/
@Command(
name = "broker",
- description = "Runs a broker node, see http://druid.io/docs/0.6.20/Broker.html for a description"
+ description = "Runs a broker node, see http://druid.io/docs/0.6.23/Broker.html for a description"
)
public class CliBroker extends ServerRunnable
{
@@ -81,8 +82,11 @@ public class CliBroker extends ServerRunnable
JsonConfigProvider.bind(binder, "druid.broker.cache", CacheProvider.class);
binder.bind(QuerySegmentWalker.class).to(ClientQuerySegmentWalker.class).in(LazySingleton.class);
- binder.bind(JettyServerInitializer.class).to(BrokerJettyServerInitializer.class).in(LazySingleton.class);
+
+ binder.bind(JettyServerInitializer.class).to(QueryJettyServerInitializer.class).in(LazySingleton.class);
+ Jerseys.addResource(binder, QueryResource.class);
Jerseys.addResource(binder, ClientInfoResource.class);
+ LifecycleModule.register(binder, QueryResource.class);
DiscoveryModule.register(binder, Self.class);
MetricsModule.register(binder, CacheMonitor.class);
diff --git a/services/src/main/java/io/druid/cli/CliCoordinator.java b/services/src/main/java/io/druid/cli/CliCoordinator.java
index d9714cf6f4e..95eab497277 100644
--- a/services/src/main/java/io/druid/cli/CliCoordinator.java
+++ b/services/src/main/java/io/druid/cli/CliCoordinator.java
@@ -63,7 +63,7 @@ import java.util.List;
*/
@Command(
name = "coordinator",
- description = "Runs the Coordinator, see http://druid.io/docs/0.6.20/Coordinator.html for a description."
+ description = "Runs the Coordinator, see http://druid.io/docs/0.6.23/Coordinator.html for a description."
)
public class CliCoordinator extends ServerRunnable
{
diff --git a/services/src/main/java/io/druid/cli/CliHadoopIndexer.java b/services/src/main/java/io/druid/cli/CliHadoopIndexer.java
index df0ea7d4360..135f0e9edfd 100644
--- a/services/src/main/java/io/druid/cli/CliHadoopIndexer.java
+++ b/services/src/main/java/io/druid/cli/CliHadoopIndexer.java
@@ -41,7 +41,7 @@ import java.util.List;
*/
@Command(
name = "hadoop",
- description = "Runs the batch Hadoop Druid Indexer, see http://druid.io/docs/0.6.20/Batch-ingestion.html for a description."
+ description = "Runs the batch Hadoop Druid Indexer, see http://druid.io/docs/0.6.23/Batch-ingestion.html for a description."
)
public class CliHadoopIndexer implements Runnable
{
diff --git a/services/src/main/java/io/druid/cli/CliHistorical.java b/services/src/main/java/io/druid/cli/CliHistorical.java
index bf61888ee9f..314f34a87fb 100644
--- a/services/src/main/java/io/druid/cli/CliHistorical.java
+++ b/services/src/main/java/io/druid/cli/CliHistorical.java
@@ -24,11 +24,13 @@ import com.google.inject.Binder;
import com.google.inject.Module;
import com.metamx.common.logger.Logger;
import io.airlift.command.Command;
+import io.druid.guice.Jerseys;
import io.druid.guice.LazySingleton;
import io.druid.guice.LifecycleModule;
import io.druid.guice.ManageLifecycle;
import io.druid.guice.NodeTypeConfig;
import io.druid.query.QuerySegmentWalker;
+import io.druid.server.QueryResource;
import io.druid.server.coordination.ServerManager;
import io.druid.server.coordination.ZkCoordinator;
import io.druid.server.initialization.JettyServerInitializer;
@@ -40,7 +42,7 @@ import java.util.List;
*/
@Command(
name = "historical",
- description = "Runs a Historical node, see http://druid.io/docs/0.6.20/Historical.html for a description"
+ description = "Runs a Historical node, see http://druid.io/docs/0.6.23/Historical.html for a description"
)
public class CliHistorical extends ServerRunnable
{
@@ -66,6 +68,8 @@ public class CliHistorical extends ServerRunnable
binder.bind(NodeTypeConfig.class).toInstance(new NodeTypeConfig("historical"));
binder.bind(JettyServerInitializer.class).to(QueryJettyServerInitializer.class).in(LazySingleton.class);
+ Jerseys.addResource(binder, QueryResource.class);
+ LifecycleModule.register(binder, QueryResource.class);
LifecycleModule.register(binder, ZkCoordinator.class);
LifecycleModule.register(binder, Server.class);
diff --git a/services/src/main/java/io/druid/cli/CliOverlord.java b/services/src/main/java/io/druid/cli/CliOverlord.java
index dd594d96547..e58b1043010 100644
--- a/services/src/main/java/io/druid/cli/CliOverlord.java
+++ b/services/src/main/java/io/druid/cli/CliOverlord.java
@@ -93,7 +93,7 @@ import java.util.List;
*/
@Command(
name = "overlord",
- description = "Runs an Overlord node, see http://druid.io/docs/0.6.20/Indexing-Service.html for a description"
+ description = "Runs an Overlord node, see http://druid.io/docs/0.6.23/Indexing-Service.html for a description"
)
public class CliOverlord extends ServerRunnable
{
diff --git a/services/src/main/java/io/druid/cli/CliPeon.java b/services/src/main/java/io/druid/cli/CliPeon.java
index 1d387cebfd0..db60016fc4a 100644
--- a/services/src/main/java/io/druid/cli/CliPeon.java
+++ b/services/src/main/java/io/druid/cli/CliPeon.java
@@ -65,6 +65,7 @@ import io.druid.segment.loading.DataSegmentKiller;
import io.druid.segment.loading.OmniDataSegmentKiller;
import io.druid.segment.loading.SegmentLoaderConfig;
import io.druid.segment.loading.StorageLocationConfig;
+import io.druid.server.QueryResource;
import io.druid.server.initialization.JettyServerInitializer;
import org.eclipse.jetty.server.Server;
@@ -149,7 +150,10 @@ public class CliPeon extends GuiceRunnable
.toInstance(new SegmentLoaderConfig().withLocations(Arrays.asList()));
binder.bind(JettyServerInitializer.class).to(QueryJettyServerInitializer.class);
+ Jerseys.addResource(binder, QueryResource.class);
Jerseys.addResource(binder, ChatHandlerResource.class);
+ LifecycleModule.register(binder, QueryResource.class);
+
binder.bind(NodeTypeConfig.class).toInstance(new NodeTypeConfig(nodeType));
LifecycleModule.register(binder, Server.class);
diff --git a/services/src/main/java/io/druid/cli/CliRealtime.java b/services/src/main/java/io/druid/cli/CliRealtime.java
index 69b9246e28b..b965098f5be 100644
--- a/services/src/main/java/io/druid/cli/CliRealtime.java
+++ b/services/src/main/java/io/druid/cli/CliRealtime.java
@@ -30,7 +30,7 @@ import java.util.List;
*/
@Command(
name = "realtime",
- description = "Runs a realtime node, see http://druid.io/docs/0.6.20/Realtime.html for a description"
+ description = "Runs a realtime node, see http://druid.io/docs/0.6.23/Realtime.html for a description"
)
public class CliRealtime extends ServerRunnable
{
diff --git a/services/src/main/java/io/druid/cli/CliRealtimeExample.java b/services/src/main/java/io/druid/cli/CliRealtimeExample.java
index 4f7c6523f02..a2f140ae08e 100644
--- a/services/src/main/java/io/druid/cli/CliRealtimeExample.java
+++ b/services/src/main/java/io/druid/cli/CliRealtimeExample.java
@@ -42,7 +42,7 @@ import java.util.concurrent.Executor;
*/
@Command(
name = "realtime",
- description = "Runs a standalone realtime node for examples, see http://druid.io/docs/0.6.20/Realtime.html for a description"
+ description = "Runs a standalone realtime node for examples, see http://druid.io/docs/0.6.23/Realtime.html for a description"
)
public class CliRealtimeExample extends ServerRunnable
{
diff --git a/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java b/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java
index f23536ff665..f3be30e00ff 100644
--- a/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java
+++ b/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java
@@ -21,7 +21,6 @@ package io.druid.cli;
import com.google.inject.Injector;
import com.google.inject.servlet.GuiceFilter;
-import io.druid.server.QueryServlet;
import io.druid.server.initialization.JettyServerInitializer;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
@@ -41,7 +40,6 @@ public class QueryJettyServerInitializer implements JettyServerInitializer
{
final ServletContextHandler queries = new ServletContextHandler(ServletContextHandler.SESSIONS);
queries.setResourceBase("/");
- queries.addServlet(new ServletHolder(injector.getInstance(QueryServlet.class)), "/druid/v2/*");
final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);
root.addServlet(new ServletHolder(new DefaultServlet()), "/*");
diff --git a/services/src/main/java/io/druid/guice/RealtimeModule.java b/services/src/main/java/io/druid/guice/RealtimeModule.java
index 094efa93f75..04f897ad010 100644
--- a/services/src/main/java/io/druid/guice/RealtimeModule.java
+++ b/services/src/main/java/io/druid/guice/RealtimeModule.java
@@ -31,6 +31,7 @@ import io.druid.segment.realtime.FireDepartment;
import io.druid.segment.realtime.NoopSegmentPublisher;
import io.druid.segment.realtime.RealtimeManager;
import io.druid.segment.realtime.SegmentPublisher;
+import io.druid.server.QueryResource;
import io.druid.server.initialization.JettyServerInitializer;
import org.eclipse.jetty.server.Server;
@@ -64,6 +65,8 @@ public class RealtimeModule implements Module
binder.bind(QuerySegmentWalker.class).to(RealtimeManager.class).in(ManageLifecycle.class);
binder.bind(NodeTypeConfig.class).toInstance(new NodeTypeConfig("realtime"));
binder.bind(JettyServerInitializer.class).to(QueryJettyServerInitializer.class).in(LazySingleton.class);
+ Jerseys.addResource(binder, QueryResource.class);
+ LifecycleModule.register(binder, QueryResource.class);
LifecycleModule.register(binder, Server.class);
}