-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Expose ImmutableOpenMap.values as a Java Collection #78529
Conversation
d77d7a2
to
16e6a77
Compare
@elasticmachine run elasticsearch-ci/rest-compatibility |
16e6a77
to
794a037
Compare
@elasticmachine update branch |
…p-value-as-collection
@elasticmachine run elasticsearch-ci/part-2 |
Pinging @elastic/es-core-infra (Team:Core/Infra) |
There was a problem hiding this 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.
server/src/test/java/org/elasticsearch/common/collect/ImmutableOpenMapTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/common/collect/ImmutableOpenMapTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/common/collect/ImmutableOpenMapTests.java
Outdated
Show resolved
Hide resolved
@elasticmachine update branch |
There was a problem hiding this 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.
server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetadata.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/cluster/ClusterChangedEventTests.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/index/IndexResolver.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/repositories/blobstore/testkit/RepositoryAnalyzeAction.java
Outdated
Show resolved
Hide resolved
…p-value-as-collection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@elasticmachine update branch |
Thanks Ryan and Henning! |
💔 Backport failed
You can use sqren/backport to manually backport by running |
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)
#76921 added support for getting
entries
as a Java stream, #77897 added the ability to get keys as aSet
. This PR adds thevalues
method which returns aCollection
to bring theImmutableOpenMap
API closer tojava.util.Map