Skip to content

Expose ImmutableOpenMap.values as a Java Collection #78529

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

Merged

Conversation

arteam
Copy link
Contributor

@arteam arteam commented Sep 30, 2021

#76921 added support for getting entries as a Java stream, #77897 added the ability to get keys as a Set. This PR adds the values method which returns a Collection to bring the ImmutableOpenMap API closer to java.util.Map

@arteam arteam force-pushed the expose-open-hash-map-value-as-collection branch from d77d7a2 to 16e6a77 Compare September 30, 2021 19:14
@arteam
Copy link
Contributor Author

arteam commented Sep 30, 2021

@elasticmachine run elasticsearch-ci/rest-compatibility

@arteam arteam force-pushed the expose-open-hash-map-value-as-collection branch from 16e6a77 to 794a037 Compare September 30, 2021 20:40
@arteam
Copy link
Contributor Author

arteam commented Oct 1, 2021

@elasticmachine update branch

@arteam
Copy link
Contributor Author

arteam commented Oct 4, 2021

@elasticmachine run elasticsearch-ci/part-2

@arteam arteam added the Team:Core/Infra Meta label for core/infra team label Oct 4, 2021
@arteam arteam marked this pull request as ready for review October 4, 2021 11:24
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@arteam arteam requested a review from henningandersen October 4, 2021 11:24
@arteam arteam added the :Core/Infra/Core Core issues without another label label Oct 4, 2021
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change overall looks good, and I like the direction this is taking us, removing direct use of hppc cursors. I think we can make the tests more robust, in general using hamcrest marchers for collection containment to give better error messages and avoid order differences across systems.

@arteam
Copy link
Contributor Author

arteam commented Oct 4, 2021

@elasticmachine update branch

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this is a nice cleanup, thanks Artem.

@arteam arteam requested a review from rjernst October 5, 2021 08:33
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arteam
Copy link
Contributor Author

arteam commented Oct 5, 2021

@elasticmachine update branch

@arteam arteam merged commit cb73e3f into elastic:master Oct 5, 2021
@arteam arteam deleted the expose-open-hash-map-value-as-collection branch October 5, 2021 15:00
@arteam arteam added auto-backport Automatically create backport pull requests when merged v7.16.0 labels Oct 5, 2021
@arteam
Copy link
Contributor Author

arteam commented Oct 5, 2021

Thanks Ryan and Henning!

@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 78529

arteam added a commit to arteam/elasticsearch that referenced this pull request Oct 5, 2021
elastic#76921 added support for getting entries as a Java stream, elastic#77897 added the ability to get keys as a Set. This PR adds the values method which returns a Collection to bring the ImmutableOpenMap API closer to java.util.Map

(cherry picked from commit cb73e3f)
arteam added a commit that referenced this pull request Oct 5, 2021
…78709)

#76921 added support for getting entries as a Java stream, #77897 added the ability to get keys as a Set. This PR adds the values method which returns a Collection to bring the ImmutableOpenMap API closer to java.util.Map

(cherry picked from commit cb73e3f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants