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

For custom index type, create ISM policy on OpenSearch if ism_policy_file parameter is set. #433

Merged
merged 3 commits into from
Oct 21, 2021

Conversation

jianghancn
Copy link
Contributor

@jianghancn jianghancn commented Oct 15, 2021

Signed-off-by: Han Jiang [email protected]

Description

For custom index type, create ISM policy on OpenSearch server if ism_policy_file parameter is set in data prepper pipeline configuration.

Update Proposal

This was part of a list of changes proposed in the RFC doc

Check List

  • [ x] New functionality includes testing.
    • [ x] All tests pass
  • New functionality has been documented. (Will update user document later)
    • New functionality has javadoc added
  • [ x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@laneholloway
Copy link
Contributor

@jianghancn Can you please fix the failing integration tests?

@jianghancn
Copy link
Contributor Author

@jianghancn Can you please fix the failing integration tests?

Now they are fixed. 👍

@jianghancn
Copy link
Contributor Author

Looking for a second reviewer, thanks.

@chenqi0805 chenqi0805 self-requested a review October 21, 2021 01:40
Copy link
Collaborator

@chenqi0805 chenqi0805 left a comment

Choose a reason for hiding this comment

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

Just one minor comment. LGTM


private final RestHighLevelClient restHighLevelClient;
private final String policyName;
private final String policyFileWithIsmTemplate;
private final String policyFile;
private final String policyFileWithoutIsmTemplate;

public IsmPolicyManagement(final RestHighLevelClient restHighLevelClient,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: if this constructor is only invoked by IndexManagerFactory for trace-analytics, we should change the modifier to protected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

George, Thanks a lot for the review! Good point, we should be able to change it from public to package private. Will make this change in an upcoming pull request.

@jianghancn jianghancn merged commit 4a132c0 into opensearch-project:main Oct 21, 2021
jianghancn added a commit to jianghancn/data-prepper that referenced this pull request Oct 27, 2021
…file parameter is set. (opensearch-project#433)

* For custom index type, create ISM policy on OpenSearch if ism_policy_file parameter is set.

Signed-off-by: Han Jiang <[email protected]>

* Remove index template from test-custom-index-policy-file.json so IT can pass
Signed-off-by: Han Jiang <[email protected]>

* To be backward compatible, drop ISM template from policy file if the field is found invalid.
Signed-off-by: Han Jiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants