From b5d0413658b72fca4befcce5a50a49e6b6f2211f Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Fri, 11 Aug 2023 17:35:02 +0700 Subject: [PATCH] Remove the usage of rollup from the rollup qa module, which is actually only testing downsampling. Also rename a few classes / directories to be be downsample oriented. --- .../DownsampleRestIT.java} | 6 +- .../test/{rollup => downsample}/10_basic.yml | 204 +++++++++--------- .../20_unsupported_aggs.yml | 0 .../30_date_histogram.yml | 24 +-- .../40_runtime_fields.yml | 0 .../50_auto_date_histogram.yml | 8 +- .../{rollup => downsample}/60_settings.yml | 16 +- 7 files changed, 129 insertions(+), 129 deletions(-) rename x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/{rollup/v2/RollupRestIT.java => downsample/DownsampleRestIT.java} (78%) rename x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/{rollup => downsample}/10_basic.yml (86%) rename x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/{rollup => downsample}/20_unsupported_aggs.yml (100%) rename x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/{rollup => downsample}/30_date_histogram.yml (94%) rename x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/{rollup => downsample}/40_runtime_fields.yml (100%) rename x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/{rollup => downsample}/50_auto_date_histogram.yml (97%) rename x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/{rollup => downsample}/60_settings.yml (90%) diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/rollup/v2/RollupRestIT.java b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleRestIT.java similarity index 78% rename from x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/rollup/v2/RollupRestIT.java rename to x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleRestIT.java index f482896c2e47a..5a66a97d16e6e 100644 --- a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/rollup/v2/RollupRestIT.java +++ b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/java/org/elasticsearch/xpack/downsample/DownsampleRestIT.java @@ -5,16 +5,16 @@ * 2.0. */ -package org.elasticsearch.xpack.rollup.v2; +package org.elasticsearch.xpack.downsample; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; -public class RollupRestIT extends ESClientYamlSuiteTestCase { +public class DownsampleRestIT extends ESClientYamlSuiteTestCase { - public RollupRestIT(final ClientYamlTestCandidate testCandidate) { + public DownsampleRestIT(final ClientYamlTestCandidate testCandidate) { super(testCandidate); } diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/10_basic.yml similarity index 86% rename from x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml rename to x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/10_basic.yml index c08e6177cddda..5097a7fabd901 100644 --- a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/10_basic.yml +++ b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/10_basic.yml @@ -299,7 +299,7 @@ setup: - do: indices.downsample: index: test - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -308,7 +308,7 @@ setup: - do: search: - index: rollup-test + index: test-downsample body: sort: [ "_tsid", "@timestamp" ] @@ -335,32 +335,32 @@ setup: # Assert rollup index settings - do: indices.get_settings: - index: rollup-test + index: test-downsample - - match: { rollup-test.settings.index.mode: time_series } - - match: { rollup-test.settings.index.time_series.end_time: 2021-04-29T00:00:00Z } - - match: { rollup-test.settings.index.time_series.start_time: 2021-04-28T00:00:00Z } - - match: { rollup-test.settings.index.routing_path: [ "metricset", "k8s.pod.uid"] } - - match: { rollup-test.settings.index.downsample.source.name: test } - - match: { rollup-test.settings.index.number_of_shards: "1" } - - match: { rollup-test.settings.index.number_of_replicas: "0" } + - match: { test-downsample.settings.index.mode: time_series } + - match: { test-downsample.settings.index.time_series.end_time: 2021-04-29T00:00:00Z } + - match: { test-downsample.settings.index.time_series.start_time: 2021-04-28T00:00:00Z } + - match: { test-downsample.settings.index.routing_path: [ "metricset", "k8s.pod.uid"] } + - match: { test-downsample.settings.index.downsample.source.name: test } + - match: { test-downsample.settings.index.number_of_shards: "1" } + - match: { test-downsample.settings.index.number_of_replicas: "0" } # Assert rollup index mapping - do: indices.get_mapping: - index: rollup-test + index: test-downsample - - match: { rollup-test.mappings.properties.@timestamp.type: date } - - match: { rollup-test.mappings.properties.@timestamp.meta.fixed_interval: 1h } - - match: { rollup-test.mappings.properties.@timestamp.meta.time_zone: UTC } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.multi-gauge.type: aggregate_metric_double } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.multi-gauge.metrics: [ "min", "max", "sum", "value_count" ] } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.multi-gauge.default_metric: max } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.multi-gauge.time_series_metric: gauge } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.multi-counter.type: long } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.multi-counter.time_series_metric: counter } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.uid.type: keyword } - - match: { rollup-test.mappings.properties.k8s.properties.pod.properties.uid.time_series_dimension: true } + - match: { test-downsample.mappings.properties.@timestamp.type: date } + - match: { test-downsample.mappings.properties.@timestamp.meta.fixed_interval: 1h } + - match: { test-downsample.mappings.properties.@timestamp.meta.time_zone: UTC } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.multi-gauge.type: aggregate_metric_double } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.multi-gauge.metrics: [ "min", "max", "sum", "value_count" ] } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.multi-gauge.default_metric: max } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.multi-gauge.time_series_metric: gauge } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.multi-counter.type: long } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.multi-counter.time_series_metric: counter } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.uid.type: keyword } + - match: { test-downsample.mappings.properties.k8s.properties.pod.properties.uid.time_series_dimension: true } # Assert source index has not been deleted @@ -371,11 +371,11 @@ setup: # Assert rollup index has been force merged - do: indices.segments: - index: rollup-test + index: test-downsample - match: { _shards.total: 1} - - match: { indices.rollup-test.shards.0.0.num_committed_segments: 1} - - match: { indices.rollup-test.shards.0.0.num_search_segments: 1} + - match: { indices.test-downsample.shards.0.0.num_committed_segments: 1} + - match: { indices.test-downsample.shards.0.0.num_search_segments: 1} --- "Downsample non-existing index": @@ -387,7 +387,7 @@ setup: catch: /no such index \[non-existing-index\]/ indices.downsample: index: non-existing-index - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -401,13 +401,13 @@ setup: - do: indices.create: - index: rollup-test + index: test-downsample - do: catch: /resource_already_exists_exception/ indices.downsample: index: test - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -456,7 +456,7 @@ setup: catch: /index_not_found_exception/ indices.downsample: index: test* - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -466,7 +466,7 @@ setup: catch: /index_not_found_exception/ indices.downsample: index: _all - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -496,7 +496,7 @@ setup: catch: /Rollup requires setting \[index.mode=time_series\] for index \[normal-index\]/ indices.downsample: index: normal-index - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -563,7 +563,7 @@ setup: - do: indices.downsample: index: no-metric-index - target_index: rollup-test-no-metric + target_index: test-downsample-no-metric body: > { "fixed_interval": "1h" @@ -573,7 +573,7 @@ setup: - do: search: - index: rollup-test-no-metric + index: test-downsample-no-metric body: sort: [ "_tsid", "@timestamp" ] @@ -655,7 +655,7 @@ setup: - do: indices.downsample: index: no-metric-no-label-index - target_index: rollup-test-no-metric-no-label + target_index: test-downsample-no-metric-no-label body: > { "fixed_interval": "1h" @@ -665,7 +665,7 @@ setup: - do: search: - index: rollup-test-no-metric-no-label + index: test-downsample-no-metric-no-label body: sort: [ "_tsid", "@timestamp" ] @@ -692,7 +692,7 @@ setup: - do: indices.downsample: index: test - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -701,8 +701,8 @@ setup: - do: indices.downsample: - index: rollup-test - target_index: rollup-test-2 + index: test-downsample + target_index: test-downsample-2 body: > { "fixed_interval": "2h" @@ -713,27 +713,27 @@ setup: # Assert rollup index mapping - do: indices.get_mapping: - index: rollup-test-2 - - - match: { rollup-test-2.mappings.properties.@timestamp.type: date } - - match: { rollup-test-2.mappings.properties.@timestamp.meta.fixed_interval: 2h } - - match: { rollup-test-2.mappings.properties.@timestamp.meta.time_zone: UTC } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.type: aggregate_metric_double } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.metrics: [ "min", "max", "sum", "value_count" ] } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.default_metric: max } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.time_series_metric: gauge } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.multi-counter.type: long } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.multi-counter.time_series_metric: counter } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.uid.type: keyword } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.uid.time_series_dimension: true } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.type: aggregate_metric_double } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.metrics: [ "min", "max", "sum", "value_count" ] } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.default_metric: max } - - match: { rollup-test-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.time_series_metric: gauge } + index: test-downsample-2 + + - match: { test-downsample-2.mappings.properties.@timestamp.type: date } + - match: { test-downsample-2.mappings.properties.@timestamp.meta.fixed_interval: 2h } + - match: { test-downsample-2.mappings.properties.@timestamp.meta.time_zone: UTC } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.type: aggregate_metric_double } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.metrics: [ "min", "max", "sum", "value_count" ] } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.default_metric: max } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.multi-gauge.time_series_metric: gauge } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.multi-counter.type: long } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.multi-counter.time_series_metric: counter } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.uid.type: keyword } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.uid.time_series_dimension: true } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.type: aggregate_metric_double } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.metrics: [ "min", "max", "sum", "value_count" ] } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.default_metric: max } + - match: { test-downsample-2.mappings.properties.k8s.properties.pod.properties.network.properties.tx.time_series_metric: gauge } - do: search: - index: rollup-test-2 + index: test-downsample-2 body: sort: [ "_tsid", "@timestamp" ] @@ -768,8 +768,8 @@ setup: - do: indices.downsample: - index: rollup-test - target_index: rollup-test-3 + index: test-downsample + target_index: test-downsample-3 body: > { "fixed_interval": "180m" @@ -785,7 +785,7 @@ setup: - do: indices.downsample: index: test - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -795,8 +795,8 @@ setup: - do: catch: /Downsampling interval \[1h\] must be greater than the source index interval \[1h\]/ indices.downsample: - index: rollup-test - target_index: rollup-test-2 + index: test-downsample + target_index: test-downsample-2 body: > { "fixed_interval": "1h" @@ -805,8 +805,8 @@ setup: - do: catch: /Downsampling interval \[30m\] must be greater than the source index interval \[1h\]/ indices.downsample: - index: rollup-test - target_index: rollup-test-2 + index: test-downsample + target_index: test-downsample-2 body: > { "fixed_interval": "30m" @@ -815,8 +815,8 @@ setup: - do: catch: /Downsampling interval \[90m\] must be a multiple of the source index interval \[1h\]/ indices.downsample: - index: rollup-test - target_index: rollup-test-2 + index: test-downsample + target_index: test-downsample-2 body: > { "fixed_interval": "90m" @@ -831,7 +831,7 @@ setup: - do: indices.downsample: index: test-histogram - target_index: rollup-test-histogram + target_index: test-downsample-histogram body: > { "fixed_interval": "1h" @@ -840,25 +840,25 @@ setup: - do: indices.get_mapping: - index: rollup-test-histogram - - - match: { rollup-test-histogram.mappings.properties.@timestamp.type: date } - - match: { rollup-test-histogram.mappings.properties.@timestamp.meta.fixed_interval: 1h } - - match: { rollup-test-histogram.mappings.properties.@timestamp.meta.time_zone: UTC } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.latency.type: histogram } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.latency.time_series_metric: null } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.empty-histogram.type: histogram } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.empty-histogram.time_series_metric: null } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.uid.type: keyword } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.uid.time_series_dimension: true } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.type: aggregate_metric_double } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.metrics: [ "min", "max", "sum", "value_count" ] } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.default_metric: max } - - match: { rollup-test-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.time_series_metric: gauge } + index: test-downsample-histogram + + - match: { test-downsample-histogram.mappings.properties.@timestamp.type: date } + - match: { test-downsample-histogram.mappings.properties.@timestamp.meta.fixed_interval: 1h } + - match: { test-downsample-histogram.mappings.properties.@timestamp.meta.time_zone: UTC } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.latency.type: histogram } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.latency.time_series_metric: null } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.empty-histogram.type: histogram } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.empty-histogram.time_series_metric: null } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.uid.type: keyword } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.uid.time_series_dimension: true } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.type: aggregate_metric_double } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.metrics: [ "min", "max", "sum", "value_count" ] } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.default_metric: max } + - match: { test-downsample-histogram.mappings.properties.k8s.properties.pod.properties.network.properties.tx.time_series_metric: gauge } - do: search: - index: rollup-test-histogram + index: test-downsample-histogram body: sort: [ "_tsid", "@timestamp" ] @@ -987,7 +987,7 @@ setup: - do: indices.downsample: index: test-timestamp - target_index: rollup-test-timestamp + target_index: test-downsample-timestamp body: > { "fixed_interval": "1h" @@ -997,7 +997,7 @@ setup: - do: search: - index: rollup-test-timestamp + index: test-downsample-timestamp body: sort: [ "_tsid", "@timestamp" ] @@ -1019,12 +1019,12 @@ setup: - do: indices.get_mapping: - index: rollup-test-timestamp + index: test-downsample-timestamp - - match: { rollup-test-timestamp.mappings.properties.@timestamp.type: date_nanos } - - match: { rollup-test-timestamp.mappings.properties.@timestamp.format: "uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSSX" } - - match: { rollup-test-timestamp.mappings.properties.@timestamp.meta.fixed_interval: 1h } - - match: { rollup-test-timestamp.mappings.properties.@timestamp.meta.time_zone: UTC } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.type: date_nanos } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.format: "uuuu-MM-dd'T'HH:mm:ss.SSSSSSSSSX" } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.meta.fixed_interval: 1h } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.meta.time_zone: UTC } --- "Downsample date timestamp field using strict_date_optional_time_nanos format": @@ -1090,7 +1090,7 @@ setup: - do: indices.downsample: index: test-timestamp - target_index: rollup-test-timestamp + target_index: test-downsample-timestamp body: > { "fixed_interval": "1h" @@ -1100,7 +1100,7 @@ setup: - do: search: - index: rollup-test-timestamp + index: test-downsample-timestamp body: sort: [ "_tsid", "@timestamp" ] @@ -1122,12 +1122,12 @@ setup: - do: indices.get_mapping: - index: rollup-test-timestamp + index: test-downsample-timestamp - - match: { rollup-test-timestamp.mappings.properties.@timestamp.type: date } - - match: { rollup-test-timestamp.mappings.properties.@timestamp.format: strict_date_optional_time_nanos } - - match: { rollup-test-timestamp.mappings.properties.@timestamp.meta.fixed_interval: 1h } - - match: { rollup-test-timestamp.mappings.properties.@timestamp.meta.time_zone: UTC } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.type: date } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.format: strict_date_optional_time_nanos } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.meta.fixed_interval: 1h } + - match: { test-downsample-timestamp.mappings.properties.@timestamp.meta.time_zone: UTC } --- "Downsample using coarse grained timestamp": @@ -1193,7 +1193,7 @@ setup: - do: indices.downsample: index: test-timestamp-daily - target_index: rollup-test-timestamp-hourly + target_index: test-downsample-timestamp-hourly body: > { "fixed_interval": "1h" @@ -1202,7 +1202,7 @@ setup: - do: search: - index: rollup-test-timestamp-hourly + index: test-downsample-timestamp-hourly body: sort: [ "_tsid", "@timestamp" ] @@ -1245,7 +1245,7 @@ setup: - do: indices.downsample: index: test-object - target_index: rollup-test-object + target_index: test-downsample-object body: > { "fixed_interval": "1h" @@ -1254,7 +1254,7 @@ setup: - do: search: - index: rollup-test-object + index: test-downsample-object body: sort: [ "_tsid", "@timestamp" ] @@ -1313,7 +1313,7 @@ setup: - do: indices.downsample: index: test-empty-missing - target_index: rollup-test-empty-missing + target_index: test-downsample-empty-missing body: > { "fixed_interval": "1h" @@ -1322,7 +1322,7 @@ setup: - do: search: - index: rollup-test-empty-missing + index: test-downsample-empty-missing body: sort: [ "_tsid", "@timestamp" ] diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/20_unsupported_aggs.yml b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/20_unsupported_aggs.yml similarity index 100% rename from x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/20_unsupported_aggs.yml rename to x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/20_unsupported_aggs.yml diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/30_date_histogram.yml b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/30_date_histogram.yml similarity index 94% rename from x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/30_date_histogram.yml rename to x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/30_date_histogram.yml index 910d14accc8f5..b0a6f699a6ac0 100644 --- a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/30_date_histogram.yml +++ b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/30_date_histogram.yml @@ -56,7 +56,7 @@ setup: - do: indices.downsample: index: test - target_index: rollup-test + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -66,13 +66,13 @@ setup: - do: search: - index: rollup-test + index: test-downsample body: sort: [ "_tsid", "@timestamp" ] - length: { hits.hits: 4 } - - match: { hits.hits.0._index: "rollup-test" } + - match: { hits.hits.0._index: "test-downsample" } - match: { hits.hits.0._source._doc_count: 1 } - match: { hits.hits.0._source.@timestamp: "2021-04-28T18:00:00.000Z" } - match: { hits.hits.0._source.uid: "001" } @@ -81,7 +81,7 @@ setup: - close_to: { hits.hits.0._source.total_memory_used.sum: { value: 106780.0, error: 0.00001 } } - match: { hits.hits.0._source.total_memory_used.value_count: 1 } - - match: { hits.hits.1._index: "rollup-test" } + - match: { hits.hits.1._index: "test-downsample" } - match: { hits.hits.1._source._doc_count: 1 } - match: { hits.hits.1._source.@timestamp: "2021-04-28T18:00:00.000Z" } - match: { hits.hits.1._source.uid: "002" } @@ -90,7 +90,7 @@ setup: - close_to: { hits.hits.1._source.total_memory_used.sum: { value: 110450.0, error: 0.00001 } } - match: { hits.hits.1._source.total_memory_used.value_count: 1 } - - match: { hits.hits.2._index: "rollup-test" } + - match: { hits.hits.2._index: "test-downsample" } - match: { hits.hits.2._source._doc_count: 1 } - match: { hits.hits.2._source.@timestamp: "2021-04-28T18:00:00.000Z" } - match: { hits.hits.2._source.uid: "003" } @@ -99,7 +99,7 @@ setup: - close_to: { hits.hits.2._source.total_memory_used.sum: { value: 109009.0, error: 0.00001 } } - match: { hits.hits.2._source.total_memory_used.value_count: 1 } - - match: { hits.hits.3._index: "rollup-test" } + - match: { hits.hits.3._index: "test-downsample" } - match: { hits.hits.3._source._doc_count: 1 } - match: { hits.hits.3._source.@timestamp: "2021-04-28T18:00:00.000Z" } - match: { hits.hits.3._source.uid: "004" } @@ -112,7 +112,7 @@ setup: - do: catch: bad_request search: - index: rollup-test + index: test-downsample body: size: 0 aggs: @@ -147,7 +147,7 @@ setup: - do: catch: bad_request search: - index: rollup-test + index: test-downsample body: size: 0 aggs: @@ -183,7 +183,7 @@ setup: # date histogram aggregation with fixed interval and utc timezone on rollup index supported - do: search: - index: rollup-test + index: test-downsample body: size: 0 aggs: @@ -223,7 +223,7 @@ setup: # date histogram aggregation on both indices resulting in partial results and shard failures - do: search: - index: test,rollup-test + index: test,test-downsample body: size: 0 aggs: @@ -234,7 +234,7 @@ setup: min_doc_count: 1 # NOTE: the rollup index is created with the same number of shards of the source index. - # As a result we have 1 shard for the 'test' index and 1 shard for the 'rollup-test' index. + # As a result we have 1 shard for the 'test' index and 1 shard for the 'test-downsample' index. - match: { _shards.total: 2 } - match: { _shards.successful: 1 } - match: { _shards.failed: 1 } @@ -245,6 +245,6 @@ setup: - match: { aggregations.date_histogram.buckets.0.key: 1619632800000 } - match: { aggregations.date_histogram.buckets.0.doc_count: 4 } - length: { _shards.failures: 1 } - - match: { _shards.failures.0.index: "rollup-test" } + - match: { _shards.failures.0.index: "test-downsample" } - match: { _shards.failures.0.reason.type: illegal_argument_exception } - match: { _shards.failures.0.reason.reason: "Field [@timestamp] of type [date] is not supported for aggregation [date_histogram] with interval type [calendar_interval]" } diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/40_runtime_fields.yml b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/40_runtime_fields.yml similarity index 100% rename from x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/40_runtime_fields.yml rename to x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/40_runtime_fields.yml diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/50_auto_date_histogram.yml b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/50_auto_date_histogram.yml similarity index 97% rename from x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/50_auto_date_histogram.yml rename to x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/50_auto_date_histogram.yml index 8c4522c1ace32..d314be1f54739 100644 --- a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/50_auto_date_histogram.yml +++ b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/50_auto_date_histogram.yml @@ -103,7 +103,7 @@ setup: - do: indices.downsample: index: test1-raw - target_index: test1-rollup + target_index: test1-downsample body: > { "fixed_interval": "1h" @@ -113,7 +113,7 @@ setup: "Auto date histogram aggregation 2 buckets": - do: search: - index: test1-rollup,test2-raw + index: test1-downsample,test2-raw body: size: 0 aggs: @@ -134,7 +134,7 @@ setup: "Auto date histogram aggregation 10 buckets": - do: search: - index: test1-rollup,test2-raw + index: test1-downsample,test2-raw body: size: 0 aggs: @@ -169,7 +169,7 @@ setup: "Auto date histogram aggregation 200 buckets": - do: search: - index: test1-rollup,test2-raw + index: test1-downsample,test2-raw body: size: 0 aggs: diff --git a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/60_settings.yml b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/60_settings.yml similarity index 90% rename from x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/60_settings.yml rename to x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/60_settings.yml index b3d09cc3527db..a9b72f7f73c6a 100644 --- a/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/rollup/60_settings.yml +++ b/x-pack/plugin/rollup/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/downsample/60_settings.yml @@ -71,7 +71,7 @@ - do: indices.downsample: index: test - target_index: test-rollup + target_index: test-downsample body: > { "fixed_interval": "1h" @@ -86,10 +86,10 @@ - do: indices.get_settings: - index: test-rollup + index: test-downsample - - match: { test-rollup.settings.index.default_pipeline: null } - - match: { test-rollup.settings.index.final_pipeline: null } + - match: { test-downsample.settings.index.default_pipeline: null } + - match: { test-downsample.settings.index.final_pipeline: null } --- "Downsample datastream with tier preference": @@ -161,7 +161,7 @@ - do: indices.downsample: index: $datastream-backing-index - target_index: rollup-index + target_index: downsample-index body: > { "fixed_interval": "1h" @@ -170,10 +170,10 @@ - do: indices.get_settings: - index: rollup-index - - match: { rollup-index.settings.index.routing.allocation.include._tier_preference: "data_warm" } + index: downsample-index + - match: { downsample-index.settings.index.routing.allocation.include._tier_preference: "data_warm" } # NOTE: copied only if index is managed through ILM - - match: { rollup-index.settings.index.lifecycle.name: null } + - match: { downsample-index.settings.index.lifecycle.name: null } --- teardown: