diff --git a/docs/content/misc/tasks.md b/docs/content/misc/tasks.md index beaa2ba6d36..8c116e248f2 100644 --- a/docs/content/misc/tasks.md +++ b/docs/content/misc/tasks.md @@ -294,6 +294,7 @@ Merge tasks merge a list of segments together. Any common timestamps are merged. "type": "merge", "id": , "dataSource": , + "aggregations": , "segments": } ``` diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTask.java index 543accff499..ebf86904d06 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTask.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Function; +import com.google.common.base.Preconditions; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -56,7 +57,7 @@ public class MergeTask extends MergeTaskBase ) { super(id, dataSource, segments, context); - this.aggregators = aggregators; + this.aggregators = Preconditions.checkNotNull(aggregators, "null aggregations"); this.indexSpec = indexSpec == null ? new IndexSpec() : indexSpec; }