update doc about aggregation field in merge task and a null check

This commit is contained in:
Himanshu Gupta 2015-09-24 22:25:07 -05:00
parent a5718ee8b7
commit 6e550d5346
2 changed files with 3 additions and 1 deletions

View File

@ -294,6 +294,7 @@ Merge tasks merge a list of segments together. Any common timestamps are merged.
"type": "merge",
"id": <task_id>,
"dataSource": <task_datasource>,
"aggregations": <list of aggregators>,
"segments": <JSON list of DataSegment objects to merge>
}
```

View File

@ -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;
}