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

[Backport 2.x] [Refactor] Stream Reader and Write Generics (#7465) #8457

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Jul 5, 2023

Backport 3923257 from #7465.

nknize added 2 commits July 5, 2023 17:17
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>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@nknize nknize added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments v2.9.0 'Issues and PRs related to version v2.9.0' labels Jul 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      2 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testDropPrimaryDuringReplication
      1 org.opensearch.client.PitIT.testDeleteAllAndListAllPits
      1 org.opensearch.client.PitIT.testCreateAndDeletePit

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #8457 (e888775) into 2.x (d150117) will increase coverage by 0.01%.
The diff coverage is 90.32%.

@@             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     
Impacted Files Coverage Δ
...h/aggregations/bucket/geogrid/InternalGeoGrid.java 95.08% <ø> (-1.64%) ⬇️
...gregations/bucket/geogrid/InternalGeoHashGrid.java 90.00% <ø> (ø)
...gregations/bucket/geogrid/InternalGeoTileGrid.java 90.00% <ø> (ø)
...pensearch/core/common/io/stream/BaseWriteable.java 61.53% <61.53%> (ø)
...opensearch/script/JodaCompatibleZonedDateTime.java 60.14% <91.66%> (+6.17%) ⬆️
...nsearch/core/common/io/stream/BaseStreamInput.java 100.00% <100.00%> (ø)
...search/core/common/io/stream/BaseStreamOutput.java 100.00% <100.00%> (ø)
...java/org/opensearch/common/geo/GeoBoundingBox.java 89.34% <100.00%> (ø)
.../main/java/org/opensearch/common/geo/GeoPoint.java 89.18% <100.00%> (+1.43%) ⬆️
...a/org/opensearch/common/io/stream/StreamInput.java 89.10% <100.00%> (-0.46%) ⬇️
... and 4 more

... and 436 files with indirect coverage changes

@reta reta merged commit c56d165 into opensearch-project:2.x Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments enhancement Enhancement or improvement to existing feature or request v2.9.0 'Issues and PRs related to version v2.9.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants