diff --git a/cassandra-storage/pom.xml b/cassandra-storage/pom.xml
index 8806f981e3a..c8dd1b0f255 100644
--- a/cassandra-storage/pom.xml
+++ b/cassandra-storage/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/common/pom.xml b/common/pom.xml
index 782c040dcd4..a5313b69991 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/docs/content/Examples.md b/docs/content/Examples.md
index 9af14b67d87..5bbc1f8ce91 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.93
+git checkout druid-0.6.95
./build.sh
```
### Downloading the DSK (Druid Standalone Kit)
-[Download](http://static.druid.io/artifacts/releases/druid-services-0.6.93-bin.tar.gz) a stand-alone tarball and run it:
+[Download](http://static.druid.io/artifacts/releases/druid-services-0.6.95-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/Indexing-Service-Config.md b/docs/content/Indexing-Service-Config.md
index 89d73a2eabb..52e604b2405 100644
--- a/docs/content/Indexing-Service-Config.md
+++ b/docs/content/Indexing-Service-Config.md
@@ -66,7 +66,7 @@ druid.host=#{IP_ADDR}:8080
druid.port=8080
druid.service=druid/prod/indexer
-druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.95"]
druid.zk.service.host=#{ZK_IPs}
druid.zk.paths.base=/druid/prod
@@ -115,7 +115,7 @@ druid.host=#{IP_ADDR}:8080
druid.port=8080
druid.service=druid/prod/worker
-druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.93","io.druid.extensions:druid-kafka-seven:0.6.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.95","io.druid.extensions:druid-kafka-seven:0.6.95"]
druid.zk.service.host=#{ZK_IPs}
druid.zk.paths.base=/druid/prod
diff --git a/docs/content/Realtime-Config.md b/docs/content/Realtime-Config.md
index 6ef260beea4..55d322f6d00 100644
--- a/docs/content/Realtime-Config.md
+++ b/docs/content/Realtime-Config.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.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-kafka-seven:0.6.95"]
druid.zk.service.host=localhost
@@ -76,7 +76,7 @@ druid.host=#{IP_ADDR}:8080
druid.port=8080
druid.service=druid/prod/realtime
-druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.93","io.druid.extensions:druid-kafka-seven:0.6.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.95","io.druid.extensions:druid-kafka-seven:0.6.95"]
druid.zk.service.host=#{ZK_IPs}
druid.zk.paths.base=/druid/prod
diff --git a/docs/content/Tutorial:-A-First-Look-at-Druid.md b/docs/content/Tutorial:-A-First-Look-at-Druid.md
index 23b19988bb9..a7458fd78cb 100644
--- a/docs/content/Tutorial:-A-First-Look-at-Druid.md
+++ b/docs/content/Tutorial:-A-First-Look-at-Druid.md
@@ -49,7 +49,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.93-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.95-bin.tar.gz). Download this file to a directory of your choosing.
You can extract the awesomeness within by issuing:
@@ -60,7 +60,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.93
+cd druid-services-0.6.95
```
You should see a bunch of files:
diff --git a/docs/content/Tutorial:-The-Druid-Cluster.md b/docs/content/Tutorial:-The-Druid-Cluster.md
index 92c056b2a5c..8840013d835 100644
--- a/docs/content/Tutorial:-The-Druid-Cluster.md
+++ b/docs/content/Tutorial:-The-Druid-Cluster.md
@@ -13,7 +13,7 @@ In this tutorial, we will set up other types of Druid nodes and external depende
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.93-bin.tar.gz)
+You can download the latest version of druid [here](http://static.druid.io/artifacts/releases/druid-services-0.6.95-bin.tar.gz)
and untar the contents within by issuing:
@@ -149,7 +149,7 @@ druid.port=8081
druid.zk.service.host=localhost
-druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.95"]
# Dummy read only AWS account (used to download example data)
druid.s3.secretKey=QyyfVZ7llSiRg6Qcrql1eEUG7buFpAK6T6engr1b
@@ -240,7 +240,7 @@ druid.port=8083
druid.zk.service.host=localhost
-druid.extensions.coordinates=["io.druid.extensions:druid-examples:0.6.93","io.druid.extensions:druid-kafka-seven:0.6.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-examples:0.6.95","io.druid.extensions:druid-kafka-seven:0.6.95"]
# Change this config to db to hand off to the rest of the Druid cluster
druid.publish.type=noop
diff --git a/docs/content/Tutorial:-Webstream.md b/docs/content/Tutorial:-Webstream.md
index 001257fb83a..1ce49277b9c 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.93-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.95-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.93
+cd druid-services-0.6.95
```
You should see a bunch of files:
diff --git a/docs/content/Twitter-Tutorial.textile b/docs/content/Twitter-Tutorial.textile
index 0201a30dd85..0497aa7b939 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.93-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.95-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 b0ea69bb5cd..e7e69c2a114 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.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-s3-extensions:0.6.95"]
# 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 00f2a644ddc..f0419626af0 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.93","io.druid.extensions:druid-kafka-seven:0.6.93","io.druid.extensions:druid-rabbitmq:0.6.93"]
+druid.extensions.coordinates=["io.druid.extensions:druid-examples:0.6.95","io.druid.extensions:druid-kafka-seven:0.6.95","io.druid.extensions:druid-rabbitmq:0.6.95"]
# Change this config to db to hand off to the rest of the Druid cluster
druid.publish.type=noop
diff --git a/examples/pom.xml b/examples/pom.xml
index dae70f132f7..bd81db6600a 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/hdfs-storage/pom.xml b/hdfs-storage/pom.xml
index 42dec8c2186..294cde4f49c 100644
--- a/hdfs-storage/pom.xml
+++ b/hdfs-storage/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/hll/pom.xml b/hll/pom.xml
index 28e9f3cf154..e1bbfdafd0c 100644
--- a/hll/pom.xml
+++ b/hll/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/indexing-hadoop/pom.xml b/indexing-hadoop/pom.xml
index 02885b1de00..73172974fe8 100644
--- a/indexing-hadoop/pom.xml
+++ b/indexing-hadoop/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/indexing-service/pom.xml b/indexing-service/pom.xml
index 9529b65bf45..04eeb330c6c 100644
--- a/indexing-service/pom.xml
+++ b/indexing-service/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/kafka-eight/pom.xml b/kafka-eight/pom.xml
index 84c835bc8cf..bc6f7e1c532 100644
--- a/kafka-eight/pom.xml
+++ b/kafka-eight/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/kafka-seven/pom.xml b/kafka-seven/pom.xml
index f1647297495..4a0f4898efc 100644
--- a/kafka-seven/pom.xml
+++ b/kafka-seven/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/pom.xml b/pom.xml
index 685de340c4f..2446b8061c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,14 +23,14 @@
io.druiddruidpom
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOTdruiddruidscm:git:ssh://git@github.com/metamx/druid.gitscm:git:ssh://git@github.com/metamx/druid.githttp://www.github.com/metamx/druid
- druid-0.6.93-SNAPSHOT
+ druid-0.6.95-SNAPSHOT
diff --git a/processing/pom.xml b/processing/pom.xml
index b1a9bcf306c..f7559ea68de 100644
--- a/processing/pom.xml
+++ b/processing/pom.xml
@@ -28,7 +28,7 @@
io.druiddruid
- 0.6.95-SNAPSHOT
+ 0.6.96-SNAPSHOT
diff --git a/processing/src/main/java/io/druid/query/FinalizeResultsQueryRunner.java b/processing/src/main/java/io/druid/query/FinalizeResultsQueryRunner.java
index 5a5b2c7bf4f..60cc710635e 100644
--- a/processing/src/main/java/io/druid/query/FinalizeResultsQueryRunner.java
+++ b/processing/src/main/java/io/druid/query/FinalizeResultsQueryRunner.java
@@ -24,7 +24,8 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.metamx.common.guava.Sequence;
import com.metamx.common.guava.Sequences;
-import io.druid.query.aggregation.AggregatorFactory;
+import io.druid.query.aggregation.FinalizeMetricManipulationFn;
+import io.druid.query.aggregation.IdentityMetricManipulationFn;
import io.druid.query.aggregation.MetricManipulationFn;
import javax.annotation.Nullable;
@@ -50,24 +51,25 @@ public class FinalizeResultsQueryRunner implements QueryRunner
{
final boolean isBySegment = query.getContextBySegment(false);
final boolean shouldFinalize = query.getContextFinalize(true);
- Function finalizerFn;
+
+ final Query queryToRun;
+ final Function finalizerFn;
+ final MetricManipulationFn metricManipulationFn;
+
+ if (shouldFinalize) {
+ queryToRun = query.withOverriddenContext(ImmutableMap.of("finalize", false));
+ metricManipulationFn = new FinalizeMetricManipulationFn();
+
+ } else {
+ queryToRun = query;
+ metricManipulationFn = new IdentityMetricManipulationFn();
+ }
if (isBySegment) {
finalizerFn = new Function()
{
final Function baseFinalizer = toolChest.makePostComputeManipulatorFn(
query,
- new MetricManipulationFn()
- {
- @Override
- public Object manipulate(AggregatorFactory factory, Object object)
- {
- if (shouldFinalize) {
- return factory.finalizeComputation(factory.deserialize(object));
- } else {
- return object;
- }
- }
- }
+ metricManipulationFn
);
@Override
@@ -88,25 +90,12 @@ public class FinalizeResultsQueryRunner implements QueryRunner
}
};
} else {
- finalizerFn = toolChest.makePostComputeManipulatorFn(
- query,
- new MetricManipulationFn()
- {
- @Override
- public Object manipulate(AggregatorFactory factory, Object object)
- {
- if (shouldFinalize) {
- return factory.finalizeComputation(factory.deserialize(object));
- } else {
- return object;
- }
- }
- }
- );
+ finalizerFn = toolChest.makePostComputeManipulatorFn(query, metricManipulationFn);
}
+
return Sequences.map(
- baseRunner.run(query.withOverriddenContext(ImmutableMap.of("finalize", false))),
+ baseRunner.run(queryToRun),
finalizerFn
);
diff --git a/processing/src/main/java/io/druid/query/aggregation/FinalizeMetricManipulationFn.java b/processing/src/main/java/io/druid/query/aggregation/FinalizeMetricManipulationFn.java
new file mode 100644
index 00000000000..e532421e572
--- /dev/null
+++ b/processing/src/main/java/io/druid/query/aggregation/FinalizeMetricManipulationFn.java
@@ -0,0 +1,31 @@
+/*
+ * 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.query.aggregation;
+
+/**
+ */
+public class FinalizeMetricManipulationFn implements MetricManipulationFn
+{
+ @Override
+ public Object manipulate(AggregatorFactory factory, Object object)
+ {
+ return factory.finalizeComputation(object);
+ }
+}
diff --git a/processing/src/main/java/io/druid/query/aggregation/IdentityMetricManipulationFn.java b/processing/src/main/java/io/druid/query/aggregation/IdentityMetricManipulationFn.java
new file mode 100644
index 00000000000..6b99838700a
--- /dev/null
+++ b/processing/src/main/java/io/druid/query/aggregation/IdentityMetricManipulationFn.java
@@ -0,0 +1,31 @@
+/*
+ * 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.query.aggregation;
+
+/**
+ */
+public class IdentityMetricManipulationFn implements MetricManipulationFn
+{
+ @Override
+ public Object manipulate(AggregatorFactory factory, Object object)
+ {
+ return object;
+ }
+}
diff --git a/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java
index 51a0c0ebbe0..6fe55153a59 100644
--- a/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java
+++ b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryQueryToolChest.java
@@ -130,42 +130,6 @@ public class TimeseriesQueryQueryToolChest extends QueryToolChest, Result> makePreComputeManipulatorFn(
- final TimeseriesQuery query, final MetricManipulationFn fn
- )
- {
- return makeComputeManipulatorFn(query, fn, false);
- }
-
- private Function, Result> makeComputeManipulatorFn(
- final TimeseriesQuery query, final MetricManipulationFn fn, final boolean calculatePostAggs
- )
- {
- return new Function, Result>()
- {
- @Override
- public Result apply(Result result)
- {
- final Map values = Maps.newHashMap();
- final TimeseriesResultValue holder = result.getValue();
- if (calculatePostAggs) {
- for (PostAggregator postAgg : query.getPostAggregatorSpecs()) {
- values.put(postAgg.getName(), postAgg.compute(holder.getBaseObject()));
- }
- }
- for (AggregatorFactory agg : query.getAggregatorSpecs()) {
- values.put(agg.getName(), fn.manipulate(agg, holder.getMetric(agg.getName())));
- }
-
- return new Result(
- result.getTimestamp(),
- new TimeseriesResultValue(values)
- );
- }
- };
- }
-
@Override
public TypeReference> getResultTypeReference()
{
@@ -273,6 +237,14 @@ public class TimeseriesQueryQueryToolChest extends QueryToolChest, Result> makePreComputeManipulatorFn(
+ final TimeseriesQuery query, final MetricManipulationFn fn
+ )
+ {
+ return makeComputeManipulatorFn(query, fn, false);
+ }
+
@Override
public Function, Result> makePostComputeManipulatorFn(
TimeseriesQuery query, MetricManipulationFn fn
@@ -281,5 +253,31 @@ public class TimeseriesQueryQueryToolChest extends QueryToolChest, Result> makeComputeManipulatorFn(
+ final TimeseriesQuery query, final MetricManipulationFn fn, final boolean calculatePostAggs
+ )
+ {
+ return new Function, Result>()
+ {
+ @Override
+ public Result apply(Result result)
+ {
+ final Map values = Maps.newHashMap();
+ final TimeseriesResultValue holder = result.getValue();
+ if (calculatePostAggs) {
+ for (PostAggregator postAgg : query.getPostAggregatorSpecs()) {
+ values.put(postAgg.getName(), postAgg.compute(holder.getBaseObject()));
+ }
+ }
+ for (AggregatorFactory agg : query.getAggregatorSpecs()) {
+ values.put(agg.getName(), fn.manipulate(agg, holder.getMetric(agg.getName())));
+ }
+ return new Result(
+ result.getTimestamp(),
+ new TimeseriesResultValue(values)
+ );
+ }
+ };
+ }
}
diff --git a/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java
index 376574733c8..f290fc29e8a 100644
--- a/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java
+++ b/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java
@@ -149,7 +149,7 @@ public class TopNQueryQueryToolChest extends QueryToolChest apply(@Nullable Result result)
+ public Result apply(Result result)
{
List