fb9e150076
* Reducing duplication in plugins around ref-counted releasable classes Both AmazonEc2Reference and AmazonS3Reference duplicate the same logic - a subclass of AbstractRefCounted that also implements Releasable. This change centralizes this paradigm into a AbstractRefCountedReleasable class and supports both clients via generics. It also updates all fetching implementations to use the get() method instead of client() Signed-off-by: Kartik Ganesh <gkart@amazon.com> * Introduce Reference classes for the Closeable and AutoCloseable interfaces These classes allow you to wrap a reference instance with an onClose runnable that is executed when close() is invoked. Two separate classes are needed because the close() signatures for the two interfaces are different. This change takes the first step to have implementing classes extend from these generic superclasses, before attempting to remove the subclasses entirely. The get() method is also replaced throughout the code base. Note that there is also a separate Releasable interface that has a similar access pattern, but is implemented separately. This is used in AbstractRefCountedReleasable introduced in a prior commit Signed-off-by: Kartik Ganesh <gkart@amazon.com> * More improvements and refactoring * Functionality around one-way gating is now moved to a dedicated class - OneWayGate. This replaces duplicate functionality throughout the code. * The two *Reference classes have been renamed to Gated* since that better represents their functionality * The AbstractRefCountedReleasable has been improved to no longer be abstract by accepting the shutdown hook. This removes the need for the inner class in ReleasableBytesReference, and further simplifies the plugin subclasses (these could probably be removed entirely). * Finally, unit tests have been added for some classes Signed-off-by: Kartik Ganesh <gkart@amazon.com> * Added tests for GatedCloseable Also updated the license information in GatedAutoCloseableTests Signed-off-by: Kartik Ganesh <gkart@amazon.com> * Fixing license information in new files Signed-off-by: Kartik Ganesh <gkart@amazon.com> * Added unit tests for RefCountedReleasable Signed-off-by: Kartik Ganesh <gkart@amazon.com> |
||
---|---|---|
.ci | ||
.github | ||
.idea | ||
benchmarks | ||
buildSrc | ||
client | ||
dev-tools | ||
distribution | ||
doc-tools | ||
gradle | ||
libs | ||
licenses | ||
modules | ||
plugins | ||
qa | ||
release-notes | ||
rest-api-spec | ||
sandbox | ||
server | ||
test | ||
.dir-locals.el | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.lychee.excludes | ||
.whitesource | ||
ADMINS.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
DEVELOPER_GUIDE.md | ||
LICENSE.txt | ||
MAINTAINERS.md | ||
NOTICE.txt | ||
README.md | ||
RELEASING.md | ||
SECURITY.md | ||
TESTING.md | ||
Vagrantfile | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
settings.gradle | ||
whitesource.config |
README.md
Welcome!
OpenSearch is a community-driven, open source fork of Elasticsearch and Kibana following the licence change in early 2021. We're looking to sustain (and evolve!) a search and analytics suite for the multitude of businesses who are dependent on the rights granted by the original, Apache v2.0 License.
Project Resources
- Project Website
- Downloads
- Documentation
- Need help? Try Forums
- Project Principles
- Contributing to OpenSearch
- Maintainer Responsibilities
- Release Management
- Admin Responsibilities
- Testing
- Security
Code of Conduct
This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ, or contact opensource-codeofconduct@amazon.com with any additional questions or comments.
Security
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
License
This project is licensed under the Apache v2.0 License.
Copyright
Copyright OpenSearch Contributors. See NOTICE for details.