Skip to content

Add HLRC support for simulate index template api#55936

Merged
andreidan merged 8 commits intoelastic:masterfrom
andreidan:itv2-simulate-hlrc
Apr 30, 2020
Merged

Add HLRC support for simulate index template api#55936
andreidan merged 8 commits intoelastic:masterfrom
andreidan:itv2-simulate-hlrc

Conversation

@andreidan
Copy link
Copy Markdown
Contributor

Relates to #53101

@andreidan andreidan added :Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v8.0.0 v7.8.0 labels Apr 29, 2020
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Apr 29, 2020
@martijnvg martijnvg mentioned this pull request Apr 29, 2020
39 tasks
@andreidan andreidan requested a review from dakrone April 29, 2020 15:24
Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I left two minor comments, thanks Andrei!

* Set the index name to simulate template matching against the index templates in the system.
*/
public SimulateIndexTemplateRequest indexName(String indexName) {
this.indexName = indexName;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We validate the indexName in the constructor but maybe we should also validate it here?

}

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems strange to have a toXContent that produces a body that isn't actually what gets sent (since we don't include the index name in the request body for simulation), do we actually need this method? Can we remove it entirely?

@andreidan andreidan merged commit 475790c into elastic:master Apr 30, 2020
andreidan added a commit to andreidan/elasticsearch that referenced this pull request Apr 30, 2020
(cherry picked from commit 475790c)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
andreidan added a commit that referenced this pull request Apr 30, 2020
(cherry picked from commit 475790c)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Indices APIs DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >enhancement Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v7.8.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants