This reverts commit 4236358f5d
.
This commit is contained in:
parent
7570d69254
commit
cd27b0b996
|
@ -42,11 +42,6 @@ import static org.elasticsearch.common.xcontent.ConstructingObjectParser.optiona
|
||||||
/**
|
/**
|
||||||
* This class holds the configuration details of a rollup job, such as the groupings, metrics, what
|
* This class holds the configuration details of a rollup job, such as the groupings, metrics, what
|
||||||
* index to rollup and where to roll them to.
|
* index to rollup and where to roll them to.
|
||||||
*
|
|
||||||
* When the configuration is stored server side, if there is no {@link MetricConfig} for the fields referenced in the
|
|
||||||
* {@link HistogramGroupConfig} and {@link DateHistogramGroupConfig} in the passed {@link GroupConfig},
|
|
||||||
* then default metrics of {@code ["min", "max"]} are provided
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class RollupJobConfig implements Validatable, ToXContentObject {
|
public class RollupJobConfig implements Validatable, ToXContentObject {
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ import org.elasticsearch.client.rollup.job.config.GroupConfig;
|
||||||
import org.elasticsearch.client.rollup.job.config.MetricConfig;
|
import org.elasticsearch.client.rollup.job.config.MetricConfig;
|
||||||
import org.elasticsearch.client.rollup.job.config.RollupJobConfig;
|
import org.elasticsearch.client.rollup.job.config.RollupJobConfig;
|
||||||
import org.elasticsearch.common.unit.TimeValue;
|
import org.elasticsearch.common.unit.TimeValue;
|
||||||
import org.elasticsearch.index.mapper.DateFieldMapper;
|
|
||||||
import org.elasticsearch.rest.RestStatus;
|
import org.elasticsearch.rest.RestStatus;
|
||||||
import org.elasticsearch.search.SearchHit;
|
import org.elasticsearch.search.SearchHit;
|
||||||
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
|
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
|
||||||
|
@ -169,9 +168,7 @@ public class RollupIT extends ESRestHighLevelClientTestCase {
|
||||||
public void testPutAndGetRollupJob() throws Exception {
|
public void testPutAndGetRollupJob() throws Exception {
|
||||||
// TODO expand this to also test with histogram and terms?
|
// TODO expand this to also test with histogram and terms?
|
||||||
final GroupConfig groups = new GroupConfig(new DateHistogramGroupConfig("date", DateHistogramInterval.DAY));
|
final GroupConfig groups = new GroupConfig(new DateHistogramGroupConfig("date", DateHistogramInterval.DAY));
|
||||||
final List<MetricConfig> metrics = Arrays.asList(
|
final List<MetricConfig> metrics = Collections.singletonList(new MetricConfig("value", SUPPORTED_METRICS));
|
||||||
new MetricConfig("value", SUPPORTED_METRICS),
|
|
||||||
new MetricConfig("date", Arrays.asList(MaxAggregationBuilder.NAME)));
|
|
||||||
final TimeValue timeout = TimeValue.timeValueSeconds(randomIntBetween(30, 600));
|
final TimeValue timeout = TimeValue.timeValueSeconds(randomIntBetween(30, 600));
|
||||||
|
|
||||||
PutRollupJobRequest putRollupJobRequest =
|
PutRollupJobRequest putRollupJobRequest =
|
||||||
|
@ -199,28 +196,21 @@ public class RollupIT extends ESRestHighLevelClientTestCase {
|
||||||
assertEquals(groups.getDateHistogram().getTimeZone(), source.get("date.date_histogram.time_zone"));
|
assertEquals(groups.getDateHistogram().getTimeZone(), source.get("date.date_histogram.time_zone"));
|
||||||
|
|
||||||
for (MetricConfig metric : metrics) {
|
for (MetricConfig metric : metrics) {
|
||||||
if (metric.getField().equals("value")) {
|
for (String name : metric.getMetrics()) {
|
||||||
for (String name : metric.getMetrics()) {
|
Number value = (Number) source.get(metric.getField() + "." + name + ".value");
|
||||||
Number value = (Number) source.get(metric.getField() + "." + name + ".value");
|
if ("min".equals(name)) {
|
||||||
if ("min".equals(name)) {
|
assertEquals(min, value.intValue());
|
||||||
assertEquals(min, value.intValue());
|
} else if ("max".equals(name)) {
|
||||||
} else if ("max".equals(name)) {
|
assertEquals(max, value.intValue());
|
||||||
assertEquals(max, value.intValue());
|
} else if ("sum".equals(name)) {
|
||||||
} else if ("sum".equals(name)) {
|
assertEquals(sum, value.doubleValue(), 0.0d);
|
||||||
assertEquals(sum, value.doubleValue(), 0.0d);
|
} else if ("avg".equals(name)) {
|
||||||
} else if ("avg".equals(name)) {
|
assertEquals(sum, value.doubleValue(), 0.0d);
|
||||||
assertEquals(sum, value.doubleValue(), 0.0d);
|
Number avgCount = (Number) source.get(metric.getField() + "." + name + "._count");
|
||||||
Number avgCount = (Number) source.get(metric.getField() + "." + name + "._count");
|
assertEquals(numDocs, avgCount.intValue());
|
||||||
assertEquals(numDocs, avgCount.intValue());
|
} else if ("value_count".equals(name)) {
|
||||||
} else if ("value_count".equals(name)) {
|
assertEquals(numDocs, value.intValue());
|
||||||
assertEquals(numDocs, value.intValue());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Number value = (Number) source.get(metric.getField() + ".max.value");
|
|
||||||
assertEquals(
|
|
||||||
DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER.parser().parseDateTime("2018-01-01T00:59:50").getMillis(),
|
|
||||||
value.longValue());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -119,68 +119,6 @@ include-tagged::{doc-tests}/RollupDocumentationIT.java[x-pack-rollup-put-rollup-
|
||||||
<2> Adds the metrics to compute on the `temperature` field
|
<2> Adds the metrics to compute on the `temperature` field
|
||||||
<3> Adds the metrics to compute on the `voltage` field
|
<3> Adds the metrics to compute on the `voltage` field
|
||||||
|
|
||||||
By default, metrics `min`/`max` for the fields in `DateHistogramGroupConfig` and
|
|
||||||
`HistogramGroupConfig` are added to the configuration unless the user already provided
|
|
||||||
metrics for those fields.
|
|
||||||
|
|
||||||
So, for the following configuration:
|
|
||||||
|
|
||||||
[source,js]
|
|
||||||
--------------------------------------------------
|
|
||||||
"groups" : {
|
|
||||||
"date_histogram": {
|
|
||||||
"field": "timestamp",
|
|
||||||
"interval": "1h",
|
|
||||||
"delay": "7d",
|
|
||||||
"time_zone": "UTC"
|
|
||||||
},
|
|
||||||
"terms": {
|
|
||||||
"fields": ["hostname", "datacenter"]
|
|
||||||
},
|
|
||||||
"histogram": {
|
|
||||||
"fields": ["load", "net_in", "net_out"],
|
|
||||||
"interval": 5
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"metrics": [
|
|
||||||
{
|
|
||||||
"field": "load",
|
|
||||||
"metrics": ["max"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "net_in",
|
|
||||||
"metrics": ["max"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
--------------------------------------------------
|
|
||||||
// NOTCONSOLE
|
|
||||||
|
|
||||||
The following will be the metrics in the configuration after
|
|
||||||
the defaults are added server side. Note the default metrics
|
|
||||||
provided for the fields `timestamp` and `net_out`
|
|
||||||
|
|
||||||
[source,js]
|
|
||||||
--------------------------------------------------
|
|
||||||
"metrics": [
|
|
||||||
{
|
|
||||||
"field": "load",
|
|
||||||
"metrics": ["max"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "net_in",
|
|
||||||
"metrics": ["max"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "timestamp",
|
|
||||||
"metrics": ["min", "max"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "net_out",
|
|
||||||
"metrics": ["min", "max"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
--------------------------------------------------
|
|
||||||
// NOTCONSOLE
|
|
||||||
|
|
||||||
[[java-rest-high-x-pack-rollup-put-rollup-job-execution]]
|
[[java-rest-high-x-pack-rollup-put-rollup-job-execution]]
|
||||||
==== Execution
|
==== Execution
|
||||||
|
|
|
@ -88,13 +88,6 @@ Which will yield the following response:
|
||||||
"metrics" : [
|
"metrics" : [
|
||||||
"avg"
|
"avg"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "timestamp",
|
|
||||||
"metrics": [
|
|
||||||
"max",
|
|
||||||
"min"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timeout" : "20s",
|
"timeout" : "20s",
|
||||||
|
@ -215,13 +208,6 @@ Which will yield the following response:
|
||||||
"metrics" : [
|
"metrics" : [
|
||||||
"avg"
|
"avg"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "timestamp",
|
|
||||||
"metrics": [
|
|
||||||
"min",
|
|
||||||
"max"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timeout" : "20s",
|
"timeout" : "20s",
|
||||||
|
@ -271,13 +257,6 @@ Which will yield the following response:
|
||||||
"metrics" : [
|
"metrics" : [
|
||||||
"avg"
|
"avg"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "timestamp",
|
|
||||||
"metrics": [
|
|
||||||
"min",
|
|
||||||
"max"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timeout" : "20s",
|
"timeout" : "20s",
|
||||||
|
|
|
@ -68,7 +68,7 @@ PUT _xpack/rollup/job/sensor
|
||||||
"groups" : {
|
"groups" : {
|
||||||
"date_histogram": {
|
"date_histogram": {
|
||||||
"field": "timestamp",
|
"field": "timestamp",
|
||||||
"interval": "60m",
|
"interval": "1h",
|
||||||
"delay": "7d"
|
"delay": "7d"
|
||||||
},
|
},
|
||||||
"terms": {
|
"terms": {
|
||||||
|
@ -98,84 +98,4 @@ When the job is created, you receive the following results:
|
||||||
"acknowledged": true
|
"acknowledged": true
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
// TESTRESPONSE
|
// TESTRESPONSE
|
||||||
|
|
||||||
By default the metrics `min`/`max` are added
|
|
||||||
for the fields in the `date_histogram` and `histogram` configurations.
|
|
||||||
If this behavior is not desired, explicitly configure metrics
|
|
||||||
for those fields. This will override the defaults.
|
|
||||||
|
|
||||||
If the following is provided
|
|
||||||
|
|
||||||
[source,js]
|
|
||||||
--------------------------------------------------
|
|
||||||
PUT _xpack/rollup/job/sensor2
|
|
||||||
{
|
|
||||||
"index_pattern": "sensor-*",
|
|
||||||
"rollup_index": "sensor_rollup",
|
|
||||||
"cron": "*/30 * * * * ?",
|
|
||||||
"page_size" :1000,
|
|
||||||
"groups" : {
|
|
||||||
"date_histogram": {
|
|
||||||
"field": "timestamp",
|
|
||||||
"interval": "60m",
|
|
||||||
"delay": "7d"
|
|
||||||
},
|
|
||||||
"histogram": {
|
|
||||||
"fields": ["voltage", "temperature"],
|
|
||||||
"interval": 5
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"metrics": [
|
|
||||||
{
|
|
||||||
"field": "temperature",
|
|
||||||
"metrics": ["min", "max", "sum"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
--------------------------------------------------
|
|
||||||
// NOTCONSOLE
|
|
||||||
// TEST[setup:sensor_index]
|
|
||||||
|
|
||||||
The actual config when created in the cluster will look as follows.
|
|
||||||
|
|
||||||
[source,js]
|
|
||||||
--------------------------------------------------
|
|
||||||
{
|
|
||||||
"index_pattern": "sensor-*",
|
|
||||||
"rollup_index": "sensor_rollup",
|
|
||||||
"cron": "*/30 * * * * ?",
|
|
||||||
"page_size" :1000,
|
|
||||||
"groups" : {
|
|
||||||
"date_histogram": {
|
|
||||||
"field": "timestamp",
|
|
||||||
"interval": "60m",
|
|
||||||
"delay": "7d"
|
|
||||||
},
|
|
||||||
"histogram": {
|
|
||||||
"fields": ["voltage", "temperature"],
|
|
||||||
"interval": 5
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"metrics": [
|
|
||||||
{
|
|
||||||
"field": "temperature",
|
|
||||||
"metrics": ["min", "max", "sum"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "voltage", <1>
|
|
||||||
"metrics": ["min", "max"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "timestamp", <1>
|
|
||||||
"metrics": ["min", "max"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
--------------------------------------------------
|
|
||||||
// NOTCONSOLE
|
|
||||||
<1> Notice the new default metrics gathered for `voltage` and `timestamp`.
|
|
||||||
Since these fields were referenced in `groups.histogram` and
|
|
||||||
`groups.date_histogram` configurations
|
|
||||||
respectively and no metrics were requested for them,
|
|
||||||
they both got the default metrics of `["min", "max"]`.
|
|
|
@ -124,12 +124,6 @@ Which will yield the following response:
|
||||||
"time_zone" : "UTC",
|
"time_zone" : "UTC",
|
||||||
"interval" : "1h",
|
"interval" : "1h",
|
||||||
"delay": "7d"
|
"delay": "7d"
|
||||||
},
|
|
||||||
{
|
|
||||||
"agg": "max"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"agg": "min"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"voltage" : [
|
"voltage" : [
|
||||||
|
|
|
@ -120,12 +120,6 @@ This will yield the following response:
|
||||||
"time_zone" : "UTC",
|
"time_zone" : "UTC",
|
||||||
"interval" : "1h",
|
"interval" : "1h",
|
||||||
"delay": "7d"
|
"delay": "7d"
|
||||||
},
|
|
||||||
{
|
|
||||||
"agg" : "max"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"agg" : "min"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"voltage" : [
|
"voltage" : [
|
||||||
|
|
|
@ -20,19 +20,14 @@ import org.elasticsearch.common.xcontent.ObjectParser;
|
||||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||||
import org.elasticsearch.common.xcontent.XContentParser;
|
import org.elasticsearch.common.xcontent.XContentParser;
|
||||||
import org.elasticsearch.search.aggregations.metrics.MaxAggregationBuilder;
|
|
||||||
import org.elasticsearch.search.aggregations.metrics.MinAggregationBuilder;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import static org.elasticsearch.common.xcontent.ConstructingObjectParser.constructorArg;
|
import static org.elasticsearch.common.xcontent.ConstructingObjectParser.constructorArg;
|
||||||
import static org.elasticsearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg;
|
import static org.elasticsearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg;
|
||||||
|
@ -51,7 +46,6 @@ public class RollupJobConfig implements NamedWriteable, ToXContentObject {
|
||||||
private static final String PAGE_SIZE = "page_size";
|
private static final String PAGE_SIZE = "page_size";
|
||||||
private static final String INDEX_PATTERN = "index_pattern";
|
private static final String INDEX_PATTERN = "index_pattern";
|
||||||
private static final String ROLLUP_INDEX = "rollup_index";
|
private static final String ROLLUP_INDEX = "rollup_index";
|
||||||
private static final List<String> DEFAULT_HISTO_METRICS = Arrays.asList(MaxAggregationBuilder.NAME, MinAggregationBuilder.NAME);
|
|
||||||
|
|
||||||
private final String id;
|
private final String id;
|
||||||
private final String indexPattern;
|
private final String indexPattern;
|
||||||
|
@ -129,7 +123,7 @@ public class RollupJobConfig implements NamedWriteable, ToXContentObject {
|
||||||
this.indexPattern = indexPattern;
|
this.indexPattern = indexPattern;
|
||||||
this.rollupIndex = rollupIndex;
|
this.rollupIndex = rollupIndex;
|
||||||
this.groupConfig = groupConfig;
|
this.groupConfig = groupConfig;
|
||||||
this.metricsConfig = addDefaultMetricsIfNeeded(metricsConfig, groupConfig);
|
this.metricsConfig = metricsConfig != null ? metricsConfig : Collections.emptyList();
|
||||||
this.timeout = timeout != null ? timeout : DEFAULT_TIMEOUT;
|
this.timeout = timeout != null ? timeout : DEFAULT_TIMEOUT;
|
||||||
this.cron = cron;
|
this.cron = cron;
|
||||||
this.pageSize = pageSize;
|
this.pageSize = pageSize;
|
||||||
|
@ -283,23 +277,4 @@ public class RollupJobConfig implements NamedWriteable, ToXContentObject {
|
||||||
public static RollupJobConfig fromXContent(final XContentParser parser, @Nullable final String optionalJobId) throws IOException {
|
public static RollupJobConfig fromXContent(final XContentParser parser, @Nullable final String optionalJobId) throws IOException {
|
||||||
return PARSER.parse(parser, optionalJobId);
|
return PARSER.parse(parser, optionalJobId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<MetricConfig> addDefaultMetricsIfNeeded(List<MetricConfig> metrics, GroupConfig groupConfig) {
|
|
||||||
List<MetricConfig> inputMetrics = metrics != null ? new ArrayList<>(metrics) : new ArrayList<>();
|
|
||||||
if (groupConfig != null) {
|
|
||||||
String timeField = groupConfig.getDateHistogram().getField();
|
|
||||||
Set<String> currentFields = inputMetrics.stream().map(MetricConfig::getField).collect(Collectors.toSet());
|
|
||||||
if (currentFields.contains(timeField) == false) {
|
|
||||||
inputMetrics.add(new MetricConfig(timeField, DEFAULT_HISTO_METRICS));
|
|
||||||
}
|
|
||||||
if (groupConfig.getHistogram() != null) {
|
|
||||||
for (String histoField : groupConfig.getHistogram().getFields()) {
|
|
||||||
if (currentFields.contains(histoField) == false) {
|
|
||||||
inputMetrics.add(new MetricConfig(histoField, DEFAULT_HISTO_METRICS));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Collections.unmodifiableList(inputMetrics);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,23 +11,10 @@ import org.elasticsearch.test.AbstractSerializingTestCase;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import static com.carrotsearch.randomizedtesting.generators.RandomStrings.randomAsciiAlphanumOfLengthBetween;
|
|
||||||
import static java.util.Collections.emptyList;
|
import static java.util.Collections.emptyList;
|
||||||
import static org.elasticsearch.xpack.core.rollup.ConfigTestHelpers.randomCron;
|
|
||||||
import static org.elasticsearch.xpack.core.rollup.ConfigTestHelpers.randomDateHistogramGroupConfig;
|
|
||||||
import static org.elasticsearch.xpack.core.rollup.ConfigTestHelpers.randomHistogramGroupConfig;
|
|
||||||
import static org.elasticsearch.xpack.core.rollup.ConfigTestHelpers.randomMetricsConfigs;
|
|
||||||
import static org.elasticsearch.xpack.core.rollup.ConfigTestHelpers.randomRollupJobConfig;
|
import static org.elasticsearch.xpack.core.rollup.ConfigTestHelpers.randomRollupJobConfig;
|
||||||
import static org.hamcrest.Matchers.containsInAnyOrder;
|
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.isIn;
|
|
||||||
|
|
||||||
|
|
||||||
public class RollupJobConfigTests extends AbstractSerializingTestCase<RollupJobConfig> {
|
public class RollupJobConfigTests extends AbstractSerializingTestCase<RollupJobConfig> {
|
||||||
|
@ -176,69 +163,4 @@ public class RollupJobConfigTests extends AbstractSerializingTestCase<RollupJobC
|
||||||
null, emptyList(), sample.getTimeout()));
|
null, emptyList(), sample.getTimeout()));
|
||||||
assertThat(e.getMessage(), equalTo("At least one grouping or metric must be configured"));
|
assertThat(e.getMessage(), equalTo("At least one grouping or metric must be configured"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDefaultFieldsForDateHistograms() {
|
|
||||||
final Random random = random();
|
|
||||||
DateHistogramGroupConfig dateHistogramGroupConfig = randomDateHistogramGroupConfig(random);
|
|
||||||
HistogramGroupConfig histogramGroupConfig1 = randomHistogramGroupConfig(random);
|
|
||||||
List<MetricConfig> metrics = new ArrayList<>(randomMetricsConfigs(random));
|
|
||||||
for (String histoField : histogramGroupConfig1.getFields()) {
|
|
||||||
metrics.add(new MetricConfig(histoField, Arrays.asList("max")));
|
|
||||||
}
|
|
||||||
GroupConfig groupConfig = new GroupConfig(dateHistogramGroupConfig, histogramGroupConfig1, null);
|
|
||||||
RollupJobConfig rollupJobConfig = new RollupJobConfig(
|
|
||||||
randomAsciiAlphanumOfLengthBetween(random, 1, 20),
|
|
||||||
"indexes_*",
|
|
||||||
"rollup_" + randomAsciiAlphanumOfLengthBetween(random, 1, 20),
|
|
||||||
randomCron(),
|
|
||||||
randomIntBetween(1, 10),
|
|
||||||
groupConfig,
|
|
||||||
metrics,
|
|
||||||
null);
|
|
||||||
Set<String> metricFields = rollupJobConfig.getMetricsConfig().stream().map(MetricConfig::getField).collect(Collectors.toSet());
|
|
||||||
assertThat(dateHistogramGroupConfig.getField(), isIn(metricFields));
|
|
||||||
List<String> histoFields = Arrays.asList(histogramGroupConfig1.getFields());
|
|
||||||
rollupJobConfig.getMetricsConfig().forEach(metricConfig -> {
|
|
||||||
if (histoFields.contains(metricConfig.getField())) {
|
|
||||||
// Since it is explicitly included, the defaults should not be added
|
|
||||||
assertThat(metricConfig.getMetrics(), containsInAnyOrder("max"));
|
|
||||||
}
|
|
||||||
if (metricConfig.getField().equals(dateHistogramGroupConfig.getField())) {
|
|
||||||
assertThat(metricConfig.getMetrics(), containsInAnyOrder("max", "min"));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testDefaultFieldsForHistograms() {
|
|
||||||
final Random random = random();
|
|
||||||
DateHistogramGroupConfig dateHistogramGroupConfig = randomDateHistogramGroupConfig(random);
|
|
||||||
HistogramGroupConfig histogramGroupConfig1 = randomHistogramGroupConfig(random);
|
|
||||||
List<MetricConfig> metrics = new ArrayList<>(randomMetricsConfigs(random));
|
|
||||||
metrics.add(new MetricConfig(dateHistogramGroupConfig.getField(), Arrays.asList("max")));
|
|
||||||
GroupConfig groupConfig = new GroupConfig(dateHistogramGroupConfig, histogramGroupConfig1, null);
|
|
||||||
RollupJobConfig rollupJobConfig = new RollupJobConfig(
|
|
||||||
randomAsciiAlphanumOfLengthBetween(random, 1, 20),
|
|
||||||
"indexes_*",
|
|
||||||
"rollup_" + randomAsciiAlphanumOfLengthBetween(random, 1, 20),
|
|
||||||
randomCron(),
|
|
||||||
randomIntBetween(1, 10),
|
|
||||||
groupConfig,
|
|
||||||
metrics,
|
|
||||||
null);
|
|
||||||
Set<String> metricFields = rollupJobConfig.getMetricsConfig().stream().map(MetricConfig::getField).collect(Collectors.toSet());
|
|
||||||
for (String histoField : histogramGroupConfig1.getFields()) {
|
|
||||||
assertThat(histoField, isIn(metricFields));
|
|
||||||
}
|
|
||||||
assertThat(dateHistogramGroupConfig.getField(), isIn(metricFields));
|
|
||||||
List<String> histoFields = Arrays.asList(histogramGroupConfig1.getFields());
|
|
||||||
rollupJobConfig.getMetricsConfig().forEach(metricConfig -> {
|
|
||||||
if (histoFields.contains(metricConfig.getField())) {
|
|
||||||
assertThat(metricConfig.getMetrics(), containsInAnyOrder("max", "min"));
|
|
||||||
}
|
|
||||||
if (metricConfig.getField().equals(dateHistogramGroupConfig.getField())) {
|
|
||||||
// Since it is explicitly included, the defaults should not be added
|
|
||||||
assertThat(metricConfig.getMetrics(), containsInAnyOrder("max"));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,8 +116,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1ms",
|
"the_histo.date_histogram.interval", "1ms",
|
||||||
"the_histo.date_histogram._count", 2,
|
"the_histo.date_histogram._count", 2,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", 3.0,
|
|
||||||
"the_histo.max.value", 3.0,
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -131,8 +129,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1ms",
|
"the_histo.date_histogram.interval", "1ms",
|
||||||
"the_histo.date_histogram._count", 1,
|
"the_histo.date_histogram._count", 1,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", 7.0,
|
|
||||||
"the_histo.max.value", 7.0,
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -183,8 +179,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"counter.max.value", 20.0,
|
"counter.max.value", 20.0,
|
||||||
"counter.sum.value", 50.0,
|
"counter.sum.value", 50.0,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) asLong("2015-03-31T03:00:00"),
|
|
||||||
"the_histo.max.value", (double) asLong("2015-03-31T03:40:00"),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -203,8 +197,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"counter.max.value", 55.0,
|
"counter.max.value", 55.0,
|
||||||
"counter.sum.value", 141.0,
|
"counter.sum.value", 141.0,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) asLong("2015-03-31T04:00:00"),
|
|
||||||
"the_histo.max.value", (double) asLong("2015-03-31T04:40:00"),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -223,8 +215,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"counter.max.value", 80.0,
|
"counter.max.value", 80.0,
|
||||||
"counter.sum.value", 275.0,
|
"counter.sum.value", 275.0,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) asLong("2015-03-31T05:00:00"),
|
|
||||||
"the_histo.max.value", (double) asLong("2015-03-31T05:40:00"),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -243,8 +233,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"counter.max.value", 100.0,
|
"counter.max.value", 100.0,
|
||||||
"counter.sum.value", 270.0,
|
"counter.sum.value", 270.0,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) asLong("2015-03-31T06:00:00"),
|
|
||||||
"the_histo.max.value", (double) asLong("2015-03-31T06:40:00"),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -263,8 +251,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"counter.max.value", 200.0,
|
"counter.max.value", 200.0,
|
||||||
"counter.sum.value", 440.0,
|
"counter.sum.value", 440.0,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) asLong("2015-03-31T07:00:00"),
|
|
||||||
"the_histo.max.value", (double) asLong("2015-03-31T07:40:00"),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -306,8 +292,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1m",
|
"the_histo.date_histogram.interval", "1m",
|
||||||
"the_histo.date_histogram._count", 2,
|
"the_histo.date_histogram._count", 2,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) (now - TimeValue.timeValueHours(5).getMillis()),
|
|
||||||
"the_histo.max.value", (double) (now - TimeValue.timeValueHours(5).getMillis()),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -321,8 +305,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1m",
|
"the_histo.date_histogram.interval", "1m",
|
||||||
"the_histo.date_histogram._count", 2,
|
"the_histo.date_histogram._count", 2,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) (now - TimeValue.timeValueMinutes(75).getMillis()),
|
|
||||||
"the_histo.max.value", (double) (now - TimeValue.timeValueMinutes(75).getMillis()),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -336,8 +318,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1m",
|
"the_histo.date_histogram.interval", "1m",
|
||||||
"the_histo.date_histogram._count", 1,
|
"the_histo.date_histogram._count", 1,
|
||||||
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
"the_histo.date_histogram.time_zone", DateTimeZone.UTC.toString(),
|
||||||
"the_histo.min.value", (double) (now - TimeValue.timeValueMinutes(61).getMillis()),
|
|
||||||
"the_histo.max.value", (double) (now - TimeValue.timeValueMinutes(61).getMillis()),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -377,8 +357,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1d",
|
"the_histo.date_histogram.interval", "1d",
|
||||||
"the_histo.date_histogram._count", 2,
|
"the_histo.date_histogram._count", 2,
|
||||||
"the_histo.date_histogram.time_zone", timeZone.toString(),
|
"the_histo.date_histogram.time_zone", timeZone.toString(),
|
||||||
"the_histo.min.value", (double) (now - TimeValue.timeValueHours(10).getMillis()),
|
|
||||||
"the_histo.max.value", (double) (now - TimeValue.timeValueHours(8).getMillis()),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -398,8 +376,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1d",
|
"the_histo.date_histogram.interval", "1d",
|
||||||
"the_histo.date_histogram._count", 2,
|
"the_histo.date_histogram._count", 2,
|
||||||
"the_histo.date_histogram.time_zone", timeZone.toString(),
|
"the_histo.date_histogram.time_zone", timeZone.toString(),
|
||||||
"the_histo.min.value", (double) (now - TimeValue.timeValueHours(10).getMillis()),
|
|
||||||
"the_histo.max.value", (double) (now - TimeValue.timeValueHours(8).getMillis()),
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
@ -413,8 +389,6 @@ public class RollupIndexerIndexingTests extends AggregatorTestCase {
|
||||||
"the_histo.date_histogram.interval", "1d",
|
"the_histo.date_histogram.interval", "1d",
|
||||||
"the_histo.date_histogram._count", 5,
|
"the_histo.date_histogram._count", 5,
|
||||||
"the_histo.date_histogram.time_zone", timeZone.toString(),
|
"the_histo.date_histogram.time_zone", timeZone.toString(),
|
||||||
"the_histo.min.value", (double) (now - TimeValue.timeValueHours(6).getMillis()),
|
|
||||||
"the_histo.max.value", (double) now,
|
|
||||||
"_rollup.id", job.getId()
|
"_rollup.id", job.getId()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
|
@ -62,10 +62,6 @@ setup:
|
||||||
- "min"
|
- "min"
|
||||||
- "max"
|
- "max"
|
||||||
- "sum"
|
- "sum"
|
||||||
- field: "the_field"
|
|
||||||
metrics:
|
|
||||||
- "max"
|
|
||||||
- "min"
|
|
||||||
timeout: "20s"
|
timeout: "20s"
|
||||||
stats:
|
stats:
|
||||||
pages_processed: 0
|
pages_processed: 0
|
||||||
|
@ -113,10 +109,6 @@ setup:
|
||||||
- "min"
|
- "min"
|
||||||
- "max"
|
- "max"
|
||||||
- "sum"
|
- "sum"
|
||||||
- field: "the_field"
|
|
||||||
metrics:
|
|
||||||
- "max"
|
|
||||||
- "min"
|
|
||||||
timeout: "20s"
|
timeout: "20s"
|
||||||
stats:
|
stats:
|
||||||
pages_processed: 0
|
pages_processed: 0
|
||||||
|
@ -164,10 +156,6 @@ setup:
|
||||||
- "min"
|
- "min"
|
||||||
- "max"
|
- "max"
|
||||||
- "sum"
|
- "sum"
|
||||||
- field: "the_field"
|
|
||||||
metrics:
|
|
||||||
- "max"
|
|
||||||
- "min"
|
|
||||||
timeout: "20s"
|
timeout: "20s"
|
||||||
stats:
|
stats:
|
||||||
pages_processed: 0
|
pages_processed: 0
|
||||||
|
|
|
@ -63,10 +63,6 @@ setup:
|
||||||
- "min"
|
- "min"
|
||||||
- "max"
|
- "max"
|
||||||
- "sum"
|
- "sum"
|
||||||
- field: "the_field"
|
|
||||||
metrics:
|
|
||||||
- "max"
|
|
||||||
- "min"
|
|
||||||
timeout: "20s"
|
timeout: "20s"
|
||||||
stats:
|
stats:
|
||||||
pages_processed: 0
|
pages_processed: 0
|
||||||
|
@ -178,10 +174,6 @@ setup:
|
||||||
- "min"
|
- "min"
|
||||||
- "max"
|
- "max"
|
||||||
- "sum"
|
- "sum"
|
||||||
- field: "the_field"
|
|
||||||
metrics:
|
|
||||||
- "max"
|
|
||||||
- "min"
|
|
||||||
timeout: "20s"
|
timeout: "20s"
|
||||||
stats:
|
stats:
|
||||||
pages_processed: 0
|
pages_processed: 0
|
||||||
|
@ -208,10 +200,6 @@ setup:
|
||||||
- "min"
|
- "min"
|
||||||
- "max"
|
- "max"
|
||||||
- "sum"
|
- "sum"
|
||||||
- field: "the_field"
|
|
||||||
metrics:
|
|
||||||
- "max"
|
|
||||||
- "min"
|
|
||||||
timeout: "20s"
|
timeout: "20s"
|
||||||
stats:
|
stats:
|
||||||
pages_processed: 0
|
pages_processed: 0
|
||||||
|
|
|
@ -77,8 +77,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -126,8 +124,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -140,8 +136,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -215,8 +209,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -229,8 +221,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -246,8 +236,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
|
|
@ -77,8 +77,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -126,8 +124,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -140,8 +136,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -190,8 +184,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -265,8 +257,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -279,8 +269,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -295,8 +283,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -374,8 +360,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -388,8 +372,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -404,8 +386,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
@ -479,8 +459,6 @@ setup:
|
||||||
- agg: "date_histogram"
|
- agg: "date_histogram"
|
||||||
interval: "1h"
|
interval: "1h"
|
||||||
time_zone: "UTC"
|
time_zone: "UTC"
|
||||||
- agg: "max"
|
|
||||||
- agg: "min"
|
|
||||||
value_field:
|
value_field:
|
||||||
- agg: "min"
|
- agg: "min"
|
||||||
- agg: "max"
|
- agg: "max"
|
||||||
|
|
|
@ -63,10 +63,6 @@ setup:
|
||||||
- "min"
|
- "min"
|
||||||
- "max"
|
- "max"
|
||||||
- "sum"
|
- "sum"
|
||||||
- field: "the_field"
|
|
||||||
metrics:
|
|
||||||
- "max"
|
|
||||||
- "min"
|
|
||||||
timeout: "20s"
|
timeout: "20s"
|
||||||
stats:
|
stats:
|
||||||
pages_processed: 0
|
pages_processed: 0
|
||||||
|
|
|
@ -173,8 +173,6 @@ teardown:
|
||||||
hits.hits.0._source:
|
hits.hits.0._source:
|
||||||
timestamp.date_histogram.time_zone: "UTC"
|
timestamp.date_histogram.time_zone: "UTC"
|
||||||
timestamp.date_histogram.timestamp: 0
|
timestamp.date_histogram.timestamp: 0
|
||||||
timestamp.max.value: 123.0
|
|
||||||
timestamp.min.value: 123.0
|
|
||||||
value_field.max.value: 1232.0
|
value_field.max.value: 1232.0
|
||||||
_rollup.version: 2
|
_rollup.version: 2
|
||||||
timestamp.date_histogram.interval: "1s"
|
timestamp.date_histogram.interval: "1s"
|
||||||
|
@ -336,8 +334,6 @@ teardown:
|
||||||
hits.hits.0._source:
|
hits.hits.0._source:
|
||||||
timestamp.date_histogram.time_zone: "UTC"
|
timestamp.date_histogram.time_zone: "UTC"
|
||||||
timestamp.date_histogram.timestamp: 0
|
timestamp.date_histogram.timestamp: 0
|
||||||
timestamp.max.value: 123.0
|
|
||||||
timestamp.min.value: 123.0
|
|
||||||
value_field.max.value: 1232.0
|
value_field.max.value: 1232.0
|
||||||
_rollup.version: 2
|
_rollup.version: 2
|
||||||
timestamp.date_histogram.interval: "1s"
|
timestamp.date_histogram.interval: "1s"
|
||||||
|
|
Loading…
Reference in New Issue