Skip to content
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

[CCR] Add get auto follow pattern api #33849

Merged

Conversation

martijnvg
Copy link
Member

Relates to #33007

@martijnvg martijnvg added review :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features labels Sep 19, 2018
@martijnvg martijnvg requested a review from dnhatn September 19, 2018 09:15
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

@martijnvg This looks great to me, but I am wondering if we should not enforce the GET request always require one clusterAlias. Should we return all auto-patterns if the clusterAlias is omitted? Thank you!

@martijnvg
Copy link
Member Author

@dnhatn Thanks for reviewing. I made the clusterAlias parameter optional and in that case all auto follow patterns are returned.

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

I left a comment to discuss.


public static class Response extends ActionResponse implements ToXContentObject {

private List<AutoFollowPattern> autoFollowPatterns;
Copy link
Member

Choose a reason for hiding this comment

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

Should we return a map of "clusterAlias" to auto-follow patterns instead of a list?

Copy link
Member Author

@martijnvg martijnvg Sep 24, 2018

Choose a reason for hiding this comment

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

Yes, if we add clusterAlias to AutoFollowPattern then we can return a map. I will add that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed this commit to let the auto follow patterns to be returned as a map: 96bf947

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @martijnvg.

@martijnvg martijnvg merged commit 2795ef5 into elastic:master Sep 24, 2018
martijnvg added a commit that referenced this pull request Sep 24, 2018
kcm pushed a commit that referenced this pull request Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >non-issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants