Skip to content

Commit becfbe6

Browse files
pquentinprwhelan
andauthored
[Transform] Upgrade Mode (#5165) (#5203)
Copy/paste docs for ML Upgrade Mode to show how we can enable or disable Transform Upgrade Mode (cherry picked from commit 5897239) # Conflicts: # specification/_doc_ids/table.csv Co-authored-by: Pat Whelan <[email protected]>
1 parent 2080d7c commit becfbe6

File tree

6 files changed

+195
-6
lines changed

6 files changed

+195
-6
lines changed

output/schema/schema.json

Lines changed: 97 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ terminate-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{bra
863863
test-grok-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/test-grok-pattern.html,,
864864
time-value,https://github.com/elastic/elasticsearch/blob/{branch}/libs/core/src/main/java/org/elasticsearch/core/TimeValue.java,,
865865
time-zone-id,https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html,,
866+
transform-set-upgrade-mode,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/transform-set-upgrade-mode.html,
866867
trim-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/trim-processor.html,,
867868
unfreeze-index-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/unfreeze-index-api.html,,
868869
update-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ml-update-data-frame-analytics,,
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { Duration } from '@_types/Time'
22+
23+
/**
24+
* Set upgrade_mode for transform indices.
25+
* Sets a cluster wide upgrade_mode setting that prepares transform
26+
* indices for an upgrade.
27+
* When upgrading your cluster, in some circumstances you must restart your
28+
* nodes and reindex your transform indices. In those circumstances,
29+
* there must be no transforms running. You can close the transforms,
30+
* do the upgrade, then open all the transforms again. Alternatively,
31+
* you can use this API to temporarily halt tasks associated with the transforms
32+
* and prevent new transforms from opening. You can also use this API
33+
* during upgrades that do not require you to reindex your transform
34+
* indices, though stopping transforms is not a requirement in that case.
35+
* You can see the current value for the upgrade_mode setting by using the get
36+
* transform info API.
37+
* @rest_spec_name transform.set_upgrade_mode
38+
* @availability stack since=8.18.0 stability=stable
39+
* @availability serverless stability=stable visibility=private
40+
* @cluster_privileges manage_transform
41+
* @doc_id transform-set-upgrade-mode
42+
*/
43+
export interface Request extends RequestBase {
44+
urls: [
45+
{
46+
path: '/_transform/set_upgrade_mode'
47+
methods: ['POST']
48+
}
49+
]
50+
query_parameters: {
51+
/**
52+
* When `true`, it enables `upgrade_mode` which temporarily halts all
53+
* transform tasks and prohibits new transform tasks from
54+
* starting.
55+
* @server_default false
56+
*/
57+
enabled?: boolean
58+
/**
59+
* The time to wait for the request to be completed.
60+
* @server_default 30s
61+
*/
62+
timeout?: Duration
63+
}
64+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { AcknowledgedResponseBase } from '@_types/Base'
21+
22+
export class Response {
23+
/** @codegen_name result */
24+
body: AcknowledgedResponseBase
25+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
method_request: POST _transform/set_upgrade_mode?enabled=true

0 commit comments

Comments
 (0)