-
Notifications
You must be signed in to change notification settings - Fork 24.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…43929) (#43947) * [ML][Data Frame] Adding bwc tests for pivot transform (#43506) * [ML][Data Frame] Adding bwc tests for pivot transform * adding continuous transforms * adding continuous dataframes to bwc * adding continuous data frame tests * Adding rolling upgrade tests for continuous df * Fixing test * Adjusting indices used in BWC, and handling NPE for seq_no_stats * updating and muting specific bwc test * Adjusting bwc tests for backport
- Loading branch information
Showing
6 changed files
with
523 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
182 changes: 182 additions & 0 deletions
182
...g-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/80_data_frame_jobs_crud.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
--- | ||
"Test put batch data frame transforms on mixed cluster": | ||
- do: | ||
cluster.health: | ||
index: "dataframe-transform-airline-data" | ||
wait_for_status: green | ||
timeout: 70s | ||
|
||
- do: | ||
data_frame.put_data_frame_transform: | ||
transform_id: "mixed-simple-transform" | ||
body: > | ||
{ | ||
"source": { "index": "dataframe-transform-airline-data" }, | ||
"dest": { "index": "mixed-simple-transform-idx" }, | ||
"pivot": { | ||
"group_by": { "airline": {"terms": {"field": "airline"}}}, | ||
"aggs": {"avg_response": {"avg": {"field": "responsetime"}}} | ||
} | ||
} | ||
- match: { acknowledged: true } | ||
|
||
- do: | ||
data_frame.start_data_frame_transform: | ||
transform_id: "mixed-simple-transform" | ||
- match: { acknowledged: true } | ||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "mixed-simple-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "mixed-simple-transform" } | ||
- match: { transforms.0.state.task_state: "/started|stopped/" } | ||
|
||
- do: | ||
data_frame.stop_data_frame_transform: | ||
transform_id: "mixed-simple-transform" | ||
wait_for_completion: true | ||
- match: { acknowledged: true } | ||
|
||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "mixed-simple-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "mixed-simple-transform" } | ||
- match: { transforms.0.state.indexer_state: "stopped" } | ||
- match: { transforms.0.state.task_state: "stopped" } | ||
|
||
- do: | ||
data_frame.put_data_frame_transform: | ||
transform_id: "mixed-complex-transform" | ||
body: > | ||
{ | ||
"source": { | ||
"index": "dataframe-transform-airline-data", | ||
"query": { | ||
"bool": { | ||
"filter": {"term": {"airline": "ElasticAir"}} | ||
} | ||
} | ||
}, | ||
"dest": { | ||
"index": "mixed-complex-transform-idx" | ||
}, | ||
"pivot": { | ||
"group_by": { | ||
"airline": {"terms": {"field": "airline"}}, | ||
"day": {"date_histogram": {"field": "timestamp", "calendar_interval": "1d"}}, | ||
"every_50": {"histogram": {"field": "responsetime", "interval": 50}} | ||
}, | ||
"aggs": {"avg_response": {"avg": {"field": "responsetime"}}} | ||
} | ||
} | ||
- match: { acknowledged: true } | ||
|
||
- do: | ||
data_frame.get_data_frame_transform: | ||
transform_id: "mixed-complex-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "mixed-complex-transform" } | ||
|
||
- do: | ||
data_frame.start_data_frame_transform: | ||
transform_id: "mixed-complex-transform" | ||
- match: { acknowledged: true } | ||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "mixed-complex-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "mixed-complex-transform" } | ||
- match: { transforms.0.state.task_state: "/started|stopped/" } | ||
|
||
- do: | ||
data_frame.stop_data_frame_transform: | ||
transform_id: "mixed-complex-transform" | ||
wait_for_completion: true | ||
- match: { acknowledged: true } | ||
|
||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "mixed-complex-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "mixed-complex-transform" } | ||
- match: { transforms.0.state.indexer_state: "stopped" } | ||
- match: { transforms.0.state.task_state: "stopped" } | ||
|
||
--- | ||
"Test GET, start, and stop old cluster batch transforms": | ||
- do: | ||
cluster.health: | ||
index: "dataframe-transform-airline-data" | ||
wait_for_status: green | ||
timeout: 70s | ||
|
||
- do: | ||
data_frame.get_data_frame_transform: | ||
transform_id: "old-simple-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "old-simple-transform" } | ||
- match: { transforms.0.source.index.0: "dataframe-transform-airline-data" } | ||
- match: { transforms.0.dest.index: "old-simple-transform-idx" } | ||
- match: { transforms.0.pivot.group_by.airline.terms.field: "airline" } | ||
- match: { transforms.0.pivot.aggregations.avg_response.avg.field: "responsetime" } | ||
|
||
- do: | ||
data_frame.start_data_frame_transform: | ||
transform_id: "old-simple-transform" | ||
- match: { acknowledged: true } | ||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "old-simple-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "old-simple-transform" } | ||
- match: { transforms.0.state.task_state: "/started|stopped/" } | ||
|
||
- do: | ||
data_frame.stop_data_frame_transform: | ||
transform_id: "old-simple-transform" | ||
wait_for_completion: true | ||
- match: { acknowledged: true } | ||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "old-simple-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "old-simple-transform" } | ||
- match: { transforms.0.state.indexer_state: "stopped" } | ||
- match: { transforms.0.state.task_state: "stopped" } | ||
|
||
- do: | ||
data_frame.get_data_frame_transform: | ||
transform_id: "old-complex-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "old-complex-transform" } | ||
- match: { transforms.0.source.index.0: "dataframe-transform-airline-data" } | ||
- match: { transforms.0.dest.index: "old-complex-transform-idx" } | ||
- match: { transforms.0.pivot.group_by.airline.terms.field: "airline" } | ||
- match: { transforms.0.pivot.group_by.day.date_histogram.field: "timestamp" } | ||
- match: { transforms.0.pivot.group_by.every_50.histogram.field: "responsetime" } | ||
- match: { transforms.0.pivot.aggregations.avg_response.avg.field: "responsetime" } | ||
|
||
- do: | ||
data_frame.start_data_frame_transform: | ||
transform_id: "old-complex-transform" | ||
- match: { acknowledged: true } | ||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "old-complex-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "old-complex-transform" } | ||
- match: { transforms.0.state.task_state: "/started|stopped/" } | ||
|
||
- do: | ||
data_frame.stop_data_frame_transform: | ||
transform_id: "old-complex-transform" | ||
wait_for_completion: true | ||
- match: { acknowledged: true } | ||
- do: | ||
data_frame.get_data_frame_transform_stats: | ||
transform_id: "old-complex-transform" | ||
- match: { count: 1 } | ||
- match: { transforms.0.id: "old-complex-transform" } | ||
- match: { transforms.0.state.indexer_state: "stopped" } | ||
- match: { transforms.0.state.task_state: "stopped" } |
Oops, something went wrong.