[Backport 2.x] [Refactor] Stream Reader and Write Generics (#7465)#8457
Merged
reta merged 2 commits intoopensearch-project:2.xfrom Jul 5, 2023
Merged
[Backport 2.x] [Refactor] Stream Reader and Write Generics (#7465)#8457reta merged 2 commits intoopensearch-project:2.xfrom
reta merged 2 commits intoopensearch-project:2.xfrom
Conversation
StreamInput and StreamOutput provide the core functionality for marshalling / unmarshalling objects over the transport wire. The class is intended to be generic but it is tightly coupled to the types defined in the server module. Because of this tight coupling, the classes cannot be refactored to the core library, thus all new types are required to be hard coded in the server module. To decouple this logic and make it more generic across opensearch modules and plugins, this commit introduces a reader and writer registry in a new BaseWriteable interface. The StreamInput and StreamOutput also now inherits from new BaseStreamInput and BaseStreamOutput classes, respectively, located in the core library. This will be the new home for streaming primitives in a follow up commit. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Contributor
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## 2.x #8457 +/- ##
============================================
+ Coverage 70.59% 70.61% +0.01%
+ Complexity 57095 57093 -2
============================================
Files 4740 4743 +3
Lines 270406 270436 +30
Branches 39927 39931 +4
============================================
+ Hits 190892 190966 +74
+ Misses 63108 63083 -25
+ Partials 16406 16387 -19
|
reta
approved these changes
Jul 5, 2023
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.
Backport 3923257 from #7465.