-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdelete_expired_data.yml
60 lines (58 loc) · 1.61 KB
/
delete_expired_data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
requires:
stack: true
serverless: false
---
setup:
- do:
ml.put_job:
job_id: delete-expired-data-a
body: >
{
"description":"Analysis of response time by airline",
"analysis_config" : {
"bucket_span" : "1h",
"detectors" :[{"function":"metric","field_name":"responsetime","by_field_name":"airline"}]
},
"data_description" : {
"time_field":"time",
"time_format":"yyyy-MM-dd HH:mm:ssX"
},
"results_retention_days" : 1,
"model_snapshot_retention_days" : 1
}
- do:
ml.put_job:
job_id: delete-expired-data-b
body: >
{
"description":"Analysis of response time by airline",
"analysis_config" : {
"bucket_span" : "1h",
"detectors" :[{"function":"metric","field_name":"responsetime","by_field_name":"airline"}]
},
"data_description" : {
"time_field":"time",
"time_format":"yyyy-MM-dd HH:mm:ssX"
},
"results_retention_days" : 1,
"model_snapshot_retention_days" : 1
}
---
teardown:
- do:
ml.delete_job:
job_id: "delete-expired-data-a"
- do:
ml.delete_job:
job_id: "delete-expired-data-b"
---
'ML delete_expired_data':
- do:
ml.delete_expired_data:
body: >
{ "timeout": "10h", "requests_per_second": 100000.0 }
- match: { deleted: true}
- do:
ml.delete_expired_data: {}
- match: { deleted: true}