-
Notifications
You must be signed in to change notification settings - Fork 198
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
Use OpenSearch constants while still supporting OpenDistro #877
Comments
OpenSearch 2.0 is currently scheduled for "early 2022" per the roadmap. I'm unsure if these "opendistro" strings will be removed or not. But, Data Prepper should get ahead of that possibility. |
This is an interesting use-case in which using the Basically, some other products provide OpenSearch-like endpoints, but are neither OpenSearch nor Elasticsearch clusters. As such, the |
OpenSearch is not removing these constant values until OpenSearch 3.0. opensearch-project/opensearch-plugins#128 Data Prepper thus does not need to resolve this issue to support OpenSearch 2.0. |
I added the breaking change tag because some solutions may require a breaking change. We can remove this tag if we decide to take a more dynamic approach. Since OpenSearch 2.0 will continue to support the old values, Data Prepper can continue to use the old values for now. |
Is your feature request related to a problem? Please describe.
Data Prepper's
opensearch
plugin currently supports both OpenSearch 1.0 clusters and OpenDistro Elasticsearch 7.10 clusters. It supports both by using "opendistro" APIs, indices, and property names.Examples:
data-prepper/data-prepper-plugins/opensearch/src/main/java/com/amazon/dataprepper/plugins/sink/opensearch/index/IndexConstants.java
Lines 27 to 29 in 06d53ae
data-prepper/data-prepper-plugins/opensearch/src/main/java/com/amazon/dataprepper/plugins/sink/opensearch/index/IsmPolicyManagement.java
Line 39 in 1183a7a
data-prepper/data-prepper-plugins/opensearch/src/test/java/com/amazon/dataprepper/plugins/sink/opensearch/OpenSearchSinkIT.java
Line 593 in 54f8ce7
All the constants are available by searching for opendistro.
These should be replaced with the new values in OpenSearch.
Describe the solution you'd like
Data Prepper can determine the cluster type. It can do this by making an initial request to the main endpoint (
/
) and getting the distribution value. Then it uses the correct constants.We would need to verify if this will work for early versions of OpenSearch (say, 1.0.0). Do these versions all use the new strings?
Describe alternatives you've considered (Optional)
Configuration
A relatively simple solution is adding a property to the
opensearch
plugin which determines if it supportsopendistro
oropensearch
. Then these usages will vary depending on the cluster type.Example:
In the 1.x series of Data Prepper, the default should be
opendistro
since this is the current behavior (it will continue to work with OpenSearch 1.x clusters). But, in Data Prepper 2.x, the default should beopensearch
.Split Plugins
The
opensearch
plugin could be split into bothopensearch
andopendistro
plugins. This might be necessary in the long-term depending on much these implementations must differ. But, I don't believe it is necessary presently.The text was updated successfully, but these errors were encountered: