|
| 1 | +--- |
| 2 | +"Test put batch data frame transforms on mixed cluster": |
| 3 | + - do: |
| 4 | + cluster.health: |
| 5 | + index: "dataframe-transform-airline-data" |
| 6 | + wait_for_status: green |
| 7 | + timeout: 70s |
| 8 | + |
| 9 | + - do: |
| 10 | + data_frame.put_data_frame_transform: |
| 11 | + transform_id: "mixed-simple-transform" |
| 12 | + body: > |
| 13 | + { |
| 14 | + "source": { "index": "dataframe-transform-airline-data" }, |
| 15 | + "dest": { "index": "mixed-simple-transform-idx" }, |
| 16 | + "pivot": { |
| 17 | + "group_by": { "airline": {"terms": {"field": "airline"}}}, |
| 18 | + "aggs": {"avg_response": {"avg": {"field": "responsetime"}}} |
| 19 | + } |
| 20 | + } |
| 21 | + - match: { acknowledged: true } |
| 22 | + |
| 23 | + - do: |
| 24 | + data_frame.start_data_frame_transform: |
| 25 | + transform_id: "mixed-simple-transform" |
| 26 | + - match: { acknowledged: true } |
| 27 | + - do: |
| 28 | + data_frame.get_data_frame_transform_stats: |
| 29 | + transform_id: "mixed-simple-transform" |
| 30 | + - match: { count: 1 } |
| 31 | + - match: { transforms.0.id: "mixed-simple-transform" } |
| 32 | + - match: { transforms.0.state.task_state: "/started|stopped/" } |
| 33 | + |
| 34 | + - do: |
| 35 | + data_frame.stop_data_frame_transform: |
| 36 | + transform_id: "mixed-simple-transform" |
| 37 | + wait_for_completion: true |
| 38 | + - match: { acknowledged: true } |
| 39 | + |
| 40 | + - do: |
| 41 | + data_frame.get_data_frame_transform_stats: |
| 42 | + transform_id: "mixed-simple-transform" |
| 43 | + - match: { count: 1 } |
| 44 | + - match: { transforms.0.id: "mixed-simple-transform" } |
| 45 | + - match: { transforms.0.state.indexer_state: "stopped" } |
| 46 | + - match: { transforms.0.state.task_state: "stopped" } |
| 47 | + |
| 48 | + - do: |
| 49 | + data_frame.put_data_frame_transform: |
| 50 | + transform_id: "mixed-complex-transform" |
| 51 | + body: > |
| 52 | + { |
| 53 | + "source": { |
| 54 | + "index": "dataframe-transform-airline-data", |
| 55 | + "query": { |
| 56 | + "bool": { |
| 57 | + "filter": {"term": {"airline": "ElasticAir"}} |
| 58 | + } |
| 59 | + } |
| 60 | + }, |
| 61 | + "dest": { |
| 62 | + "index": "mixed-complex-transform-idx" |
| 63 | + }, |
| 64 | + "pivot": { |
| 65 | + "group_by": { |
| 66 | + "airline": {"terms": {"field": "airline"}}, |
| 67 | + "day": {"date_histogram": {"field": "timestamp", "calendar_interval": "1d"}}, |
| 68 | + "every_50": {"histogram": {"field": "responsetime", "interval": 50}} |
| 69 | + }, |
| 70 | + "aggs": {"avg_response": {"avg": {"field": "responsetime"}}} |
| 71 | + } |
| 72 | + } |
| 73 | + - match: { acknowledged: true } |
| 74 | + |
| 75 | + - do: |
| 76 | + data_frame.get_data_frame_transform: |
| 77 | + transform_id: "mixed-complex-transform" |
| 78 | + - match: { count: 1 } |
| 79 | + - match: { transforms.0.id: "mixed-complex-transform" } |
| 80 | + |
| 81 | + - do: |
| 82 | + data_frame.start_data_frame_transform: |
| 83 | + transform_id: "mixed-complex-transform" |
| 84 | + - match: { acknowledged: true } |
| 85 | + - do: |
| 86 | + data_frame.get_data_frame_transform_stats: |
| 87 | + transform_id: "mixed-complex-transform" |
| 88 | + - match: { count: 1 } |
| 89 | + - match: { transforms.0.id: "mixed-complex-transform" } |
| 90 | + - match: { transforms.0.state.task_state: "/started|stopped/" } |
| 91 | + |
| 92 | + - do: |
| 93 | + data_frame.stop_data_frame_transform: |
| 94 | + transform_id: "mixed-complex-transform" |
| 95 | + wait_for_completion: true |
| 96 | + - match: { acknowledged: true } |
| 97 | + |
| 98 | + - do: |
| 99 | + data_frame.get_data_frame_transform_stats: |
| 100 | + transform_id: "mixed-complex-transform" |
| 101 | + - match: { count: 1 } |
| 102 | + - match: { transforms.0.id: "mixed-complex-transform" } |
| 103 | + - match: { transforms.0.state.indexer_state: "stopped" } |
| 104 | + - match: { transforms.0.state.task_state: "stopped" } |
| 105 | + |
| 106 | +--- |
| 107 | +"Test GET, start, and stop old cluster batch transforms": |
| 108 | + - do: |
| 109 | + cluster.health: |
| 110 | + index: "dataframe-transform-airline-data" |
| 111 | + wait_for_status: green |
| 112 | + timeout: 70s |
| 113 | + |
| 114 | + - do: |
| 115 | + data_frame.get_data_frame_transform: |
| 116 | + transform_id: "old-simple-transform" |
| 117 | + - match: { count: 1 } |
| 118 | + - match: { transforms.0.id: "old-simple-transform" } |
| 119 | + - match: { transforms.0.source.index.0: "dataframe-transform-airline-data" } |
| 120 | + - match: { transforms.0.dest.index: "old-simple-transform-idx" } |
| 121 | + - match: { transforms.0.pivot.group_by.airline.terms.field: "airline" } |
| 122 | + - match: { transforms.0.pivot.aggregations.avg_response.avg.field: "responsetime" } |
| 123 | + |
| 124 | + - do: |
| 125 | + data_frame.start_data_frame_transform: |
| 126 | + transform_id: "old-simple-transform" |
| 127 | + - match: { acknowledged: true } |
| 128 | + - do: |
| 129 | + data_frame.get_data_frame_transform_stats: |
| 130 | + transform_id: "old-simple-transform" |
| 131 | + - match: { count: 1 } |
| 132 | + - match: { transforms.0.id: "old-simple-transform" } |
| 133 | + - match: { transforms.0.state.task_state: "/started|stopped/" } |
| 134 | + |
| 135 | + - do: |
| 136 | + data_frame.stop_data_frame_transform: |
| 137 | + transform_id: "old-simple-transform" |
| 138 | + wait_for_completion: true |
| 139 | + - match: { acknowledged: true } |
| 140 | + - do: |
| 141 | + data_frame.get_data_frame_transform_stats: |
| 142 | + transform_id: "old-simple-transform" |
| 143 | + - match: { count: 1 } |
| 144 | + - match: { transforms.0.id: "old-simple-transform" } |
| 145 | + - match: { transforms.0.state.indexer_state: "stopped" } |
| 146 | + - match: { transforms.0.state.task_state: "stopped" } |
| 147 | + |
| 148 | + - do: |
| 149 | + data_frame.get_data_frame_transform: |
| 150 | + transform_id: "old-complex-transform" |
| 151 | + - match: { count: 1 } |
| 152 | + - match: { transforms.0.id: "old-complex-transform" } |
| 153 | + - match: { transforms.0.source.index.0: "dataframe-transform-airline-data" } |
| 154 | + - match: { transforms.0.dest.index: "old-complex-transform-idx" } |
| 155 | + - match: { transforms.0.pivot.group_by.airline.terms.field: "airline" } |
| 156 | + - match: { transforms.0.pivot.group_by.day.date_histogram.field: "timestamp" } |
| 157 | + - match: { transforms.0.pivot.group_by.every_50.histogram.field: "responsetime" } |
| 158 | + - match: { transforms.0.pivot.aggregations.avg_response.avg.field: "responsetime" } |
| 159 | + |
| 160 | + - do: |
| 161 | + data_frame.start_data_frame_transform: |
| 162 | + transform_id: "old-complex-transform" |
| 163 | + - match: { acknowledged: true } |
| 164 | + - do: |
| 165 | + data_frame.get_data_frame_transform_stats: |
| 166 | + transform_id: "old-complex-transform" |
| 167 | + - match: { count: 1 } |
| 168 | + - match: { transforms.0.id: "old-complex-transform" } |
| 169 | + - match: { transforms.0.state.task_state: "/started|stopped/" } |
| 170 | + |
| 171 | + - do: |
| 172 | + data_frame.stop_data_frame_transform: |
| 173 | + transform_id: "old-complex-transform" |
| 174 | + wait_for_completion: true |
| 175 | + - match: { acknowledged: true } |
| 176 | + - do: |
| 177 | + data_frame.get_data_frame_transform_stats: |
| 178 | + transform_id: "old-complex-transform" |
| 179 | + - match: { count: 1 } |
| 180 | + - match: { transforms.0.id: "old-complex-transform" } |
| 181 | + - match: { transforms.0.state.indexer_state: "stopped" } |
| 182 | + - match: { transforms.0.state.task_state: "stopped" } |
0 commit comments