-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Make DiscoveryNodes behave like a collection #83453
Merged
Merged
Conversation
This file contains 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
Extend from `AbstractCollection`. Advantages: * Optimized version of `spliterator` based on the size implemented in `AbstractCollection` by default * Exposed `stream` method, so consumers don't need to call `StreamSupport.stream(discoveryNodes.spliterator(), false)`
arteam
added
>non-issue
:Distributed/Distributed
A catch all label for anything in the Distributed Area. If you aren't sure, use this one.
labels
Feb 3, 2022
@elasticmachine update branch |
@elasticmachine update branch |
Pinging @elastic/es-distributed (Team:Distributed) |
idegtiarenko
reviewed
Feb 4, 2022
server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java
Outdated
Show resolved
Hide resolved
idegtiarenko
approved these changes
Feb 4, 2022
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.
👍
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample |
1 similar comment
@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample |
arteam
added
auto-backport
Automatically create backport pull requests when merged
v8.1.0
labels
Feb 4, 2022
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Feb 4, 2022
Backports elastic#83453 to 8.1 ``` Extend from `AbstractCollection`. Advantages: * Optimized version of `spliterator` based on the size implemented in `AbstractCollection` by default * Exposed `stream` method, so consumers don't need to call `StreamSupport.stream(discoveryNodes.spliterator(), false)` ```
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Feb 4, 2022
Extend it from `AbstractCollection` instead of `Iterable` analogous to elastic#83453
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Feb 4, 2022
Since DiscoverNodes now extends `AbstractCollection` we don't need a method exposing DiscoveryNodes as a `Collection` and we can call `stream` directly on `DiscoveryNodes` See elastic#83453
arteam
added a commit
that referenced
this pull request
Feb 4, 2022
Backports #83453 to 8.1 ``` Extend from `AbstractCollection`. Advantages: * Optimized version of `spliterator` based on the size implemented in `AbstractCollection` by default * Exposed `stream` method, so consumers don't need to call `StreamSupport.stream(discoveryNodes.spliterator(), false)` ```
arteam
added a commit
that referenced
this pull request
Feb 7, 2022
Extend it from `AbstractCollection` instead of `Iterable` analogous to #83453
arteam
added a commit
that referenced
this pull request
Feb 7, 2022
Since DiscoverNodes now extends `AbstractCollection` we don't need a method exposing DiscoveryNodes as a `Collection` and we can call `stream` directly on `DiscoveryNodes` See #83453
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Feb 7, 2022
Extend it from `AbstractCollection` instead of `Iterable` analogous to elastic#83453
arteam
added a commit
to arteam/elasticsearch
that referenced
this pull request
Feb 7, 2022
Since DiscoverNodes now extends `AbstractCollection` we don't need a method exposing DiscoveryNodes as a `Collection` and we can call `stream` directly on `DiscoveryNodes` See elastic#83453
arteam
added a commit
that referenced
this pull request
Feb 7, 2022
arteam
added a commit
that referenced
this pull request
Feb 7, 2022
arteam
added a commit
that referenced
this pull request
Feb 14, 2022
arteam
added a commit
that referenced
this pull request
Feb 14, 2022
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
:Distributed/Distributed
A catch all label for anything in the Distributed Area. If you aren't sure, use this one.
>non-issue
Team:Distributed
Meta label for distributed team
v8.1.0
v8.2.0
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.
Extend from
AbstractCollection
. Advantages:spliterator
based on the collection size which is implemented inAbstractCollection
by default.stream
method, so consumers don't need to callStreamSupport.stream(discoveryNodes.spliterator(), false)