-
Notifications
You must be signed in to change notification settings - Fork 115
Adding new reindex data stream apis #3517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8fa781c
Adding new reindex data stream apis
masseyke d05ce00
fixing a typo, and correcting docs
masseyke 64dd485
adding more specific types for create_from
masseyke 4c81332
Run make contrib
pquentin b2f3bbd
Fix migrate.create_from YAML tests
pquentin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,28 @@ | ||
| { | ||
| "migrate.cancel_reindex": { | ||
| "documentation": { | ||
| "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", | ||
| "description": "This API cancels migration reindex attempt for a data stream or index" | ||
| }, | ||
| "stability": "experimental", | ||
| "visibility": "private", | ||
| "headers": { | ||
| "accept": ["application/json"], | ||
| "content_type": ["application/json"] | ||
| }, | ||
| "url": { | ||
| "paths": [ | ||
| { | ||
| "path": "/_migration/reindex/{index}/_cancel", | ||
| "methods": ["POST"], | ||
| "parts": { | ||
| "index": { | ||
| "type": "string", | ||
| "description": "The index or data stream name" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,36 @@ | ||
| { | ||
| "migrate.create_from": { | ||
| "documentation": { | ||
| "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", | ||
| "description": "This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values." | ||
| }, | ||
| "stability": "experimental", | ||
| "visibility": "private", | ||
| "headers": { | ||
| "accept": ["application/json"], | ||
| "content_type": ["application/json"] | ||
| }, | ||
| "url": { | ||
| "paths": [ | ||
| { | ||
| "path": "/_create_from/{source}/{dest}", | ||
| "methods": ["PUT", "POST"], | ||
| "parts": { | ||
| "source": { | ||
| "type": "string", | ||
| "description": "The source index name" | ||
| }, | ||
| "dest": { | ||
| "type": "string", | ||
| "description": "The destination index name" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "body": { | ||
| "description": "The body contains the fields `mappings_override` and `settings_override`.", | ||
| "required": false | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,28 @@ | ||
| { | ||
| "migrate.get_reindex_status": { | ||
| "documentation": { | ||
| "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", | ||
| "description": "This API returns the status of a migration reindex attempt for a data stream or index" | ||
| }, | ||
| "stability": "experimental", | ||
| "visibility": "private", | ||
| "headers": { | ||
| "accept": ["application/json"], | ||
| "content_type": ["application/json"] | ||
| }, | ||
| "url": { | ||
| "paths": [ | ||
| { | ||
| "path": "/_migration/reindex/{index}/_status", | ||
| "methods": ["GET"], | ||
| "parts": { | ||
| "index": { | ||
| "type": "string", | ||
| "description": "The index or data stream name" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,26 @@ | ||
| { | ||
| "migrate.reindex": { | ||
| "documentation": { | ||
| "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", | ||
| "description": "This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task" | ||
| }, | ||
| "stability": "experimental", | ||
| "visibility": "private", | ||
| "headers": { | ||
| "accept": ["application/json"], | ||
| "content_type": ["application/json"] | ||
| }, | ||
| "url": { | ||
| "paths": [ | ||
| { | ||
| "path": "/_migration/reindex", | ||
| "methods": ["POST"] | ||
| } | ||
| ] | ||
| }, | ||
| "body": { | ||
| "description": "The body contains the fields `mode` and `source.index`, where the only mode currently supported is `upgrade`, and the `source.index` must be a data stream name", | ||
| "required": true | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,32 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import { Indices } from '@_types/common' | ||
|
|
||
| export class CreateFrom { | ||
| /** | ||
| * Reindex mode. Currently only 'upgrade' is supported. | ||
| */ | ||
| mappings_override: string | ||
| /** | ||
| * The source index or data stream (only data streams are currently supported). | ||
| */ | ||
| settings_ovveride: string | ||
| } | ||
|
|
||
This file contains hidden or 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,35 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import { Indices } from '@_types/common' | ||
|
|
||
| export class MigrateReindex { | ||
| /** | ||
| * Reindex mode. Currently only 'upgrade' is supported. | ||
| */ | ||
| mode: string | ||
| /** | ||
| * The source index or data stream (only data streams are currently supported). | ||
| */ | ||
| source: Index | ||
| } | ||
|
|
||
| export class Index { | ||
| index: Indices | ||
| } |
37 changes: 37 additions & 0 deletions
37
specification/migrate/cancel_reindex/MigrateCancelReindexRequest.ts
This file contains hidden or 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,37 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import { RequestBase } from '@_types/Base' | ||
| import { Indices } from '@_types/common' | ||
|
|
||
| /** | ||
| * This API cancels a migration reindex attempt for a data stream or index | ||
| * | ||
| * @rest_spec_name migrate.cancel_reindex | ||
| * @availability stack since=8.18.0 stability=experimental | ||
| * @availability serverless stability=experimental visibility=private | ||
| * @doc_id migrate | ||
| * @doc_tag cancel_reindex | ||
| */ | ||
| export interface Request extends RequestBase { | ||
| path_parts: { | ||
| /** The index or data stream name */ | ||
| index: Indices | ||
| } | ||
| } |
24 changes: 24 additions & 0 deletions
24
specification/migrate/cancel_reindex/MigrateCancelReindexResponse.ts
This file contains hidden or 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,24 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import { AcknowledgedResponseBase } from '@_types/Base' | ||
|
|
||
| export class Response { | ||
| body: AcknowledgedResponseBase | ||
| } |
42 changes: 42 additions & 0 deletions
42
specification/migrate/create_from/MigrateCreateFromRequest.ts
This file contains hidden or 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,42 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import { MigrateReindex } from '../_types/MigrateReindex' | ||
| import { RequestBase } from '@_types/Base' | ||
| import { Indices } from '@_types/common' | ||
|
|
||
| /** | ||
| * This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values. | ||
| * | ||
| * @rest_spec_name migrate.create_from | ||
| * @availability stack since=8.18.0 stability=experimental | ||
| * @availability serverless stability=experimental visibility=private | ||
| * @doc_id migrate | ||
| * @doc_tag create_from | ||
| */ | ||
| export interface Request extends RequestBase { | ||
| path_parts: { | ||
| /** The source index or data stream name */ | ||
| source: string, | ||
| /** The destination index or data stream name */ | ||
| dest: string | ||
| }, | ||
| /** @codegen_name create_from */ | ||
| body: MigrateReindex | ||
| } |
24 changes: 24 additions & 0 deletions
24
specification/migrate/create_from/MigrateCreateFromResponse.ts
This file contains hidden or 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,24 @@ | ||
| /* | ||
| * Licensed to Elasticsearch B.V. under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch B.V. licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| import { AcknowledgedResponseBase } from '@_types/Base' | ||
|
|
||
| export class Response { | ||
| body: AcknowledgedResponseBase | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.