Migrate IndexToolsAdapter to OS Java client#25030
Merged
moesterheld merged 6 commits intomasterfrom Mar 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the IndexToolsAdapter for OpenSearch 3 from the deprecated Rest high-level client to the official OpenSearch Java client. The migration maintains full backward compatibility while modernizing the underlying client implementation.
Changes:
- Replaced IndexToolsAdapterOS2 with IndexToolsAdapterOS using the official OpenSearch Java client
- Added comprehensive integration tests for IndexToolsAdapter across all storage backends
- Updated module bindings and test infrastructure to use the new implementation
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| graylog2-server/src/test/java/org/graylog2/indexer/IndexToolsAdapterIT.java | New abstract integration test base class with comprehensive test coverage for count and fieldHistogram methods |
| graylog-storage-opensearch3/src/test/java/org/graylog/storage/opensearch3/testing/AdaptersOS.java | Updated test adapter factory to instantiate IndexToolsAdapterOS with OfficialOpensearchClient |
| graylog-storage-opensearch3/src/test/java/org/graylog/storage/opensearch3/IndexToolsAdapterOSIT.java | New OpenSearch3-specific integration test implementation extending base test class |
| graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3/OpenSearch3Module.java | Updated dependency injection binding to use IndexToolsAdapterOS instead of IndexToolsAdapterOS2 |
| graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3/IndexToolsAdapterOS2.java | Removed deprecated implementation using Rest high-level client |
| graylog-storage-opensearch3/src/main/java/org/graylog/storage/opensearch3/IndexToolsAdapterOS.java | New implementation using official OpenSearch Java client with equivalent functionality |
| graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/IndexToolsAdapterOS2IT.java | Added integration tests for OpenSearch2 adapter for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrates IndexToolsAdapter to OS Java client
/nocl internal change
Motivation and Context
closes #25016
How Has This Been Tested?
added new IT
Screenshots (if appropriate):
Types of changes
Checklist: