mirror of https://github.com/apache/druid.git
update doc about aggregation field in merge task and a null check
This commit is contained in:
parent
a5718ee8b7
commit
6e550d5346
|
@ -294,6 +294,7 @@ Merge tasks merge a list of segments together. Any common timestamps are merged.
|
||||||
"type": "merge",
|
"type": "merge",
|
||||||
"id": <task_id>,
|
"id": <task_id>,
|
||||||
"dataSource": <task_datasource>,
|
"dataSource": <task_datasource>,
|
||||||
|
"aggregations": <list of aggregators>,
|
||||||
"segments": <JSON list of DataSegment objects to merge>
|
"segments": <JSON list of DataSegment objects to merge>
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -21,6 +21,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.base.Throwables;
|
import com.google.common.base.Throwables;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
@ -56,7 +57,7 @@ public class MergeTask extends MergeTaskBase
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
super(id, dataSource, segments, context);
|
super(id, dataSource, segments, context);
|
||||||
this.aggregators = aggregators;
|
this.aggregators = Preconditions.checkNotNull(aggregators, "null aggregations");
|
||||||
this.indexSpec = indexSpec == null ? new IndexSpec() : indexSpec;
|
this.indexSpec = indexSpec == null ? new IndexSpec() : indexSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue