Skip to content

Commit

Permalink
Remove the usage of rollup from the rollup qa module,
Browse files Browse the repository at this point in the history
which is actually only testing downsampling.
Also rename a few classes / directories to be be downsample oriented.
  • Loading branch information
martijnvg committed Aug 11, 2023
1 parent bd4dcbd commit b5d0413
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ setup:
- do:
indices.downsample:
index: test
target_index: rollup-test
target_index: test-downsample
body: >
{
"fixed_interval": "1h"
Expand All @@ -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" }
Expand All @@ -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" }
Expand All @@ -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" }
Expand All @@ -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" }
Expand All @@ -112,7 +112,7 @@ setup:
- do:
catch: bad_request
search:
index: rollup-test
index: test-downsample
body:
size: 0
aggs:
Expand Down Expand Up @@ -147,7 +147,7 @@ setup:
- do:
catch: bad_request
search:
index: rollup-test
index: test-downsample
body:
size: 0
aggs:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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 }
Expand All @@ -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]" }
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ setup:
- do:
indices.downsample:
index: test1-raw
target_index: test1-rollup
target_index: test1-downsample
body: >
{
"fixed_interval": "1h"
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
- do:
indices.downsample:
index: test
target_index: test-rollup
target_index: test-downsample
body: >
{
"fixed_interval": "1h"
Expand All @@ -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":
Expand Down Expand Up @@ -161,7 +161,7 @@
- do:
indices.downsample:
index: $datastream-backing-index
target_index: rollup-index
target_index: downsample-index
body: >
{
"fixed_interval": "1h"
Expand All @@ -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:
Expand Down

0 comments on commit b5d0413

Please sign in to comment.