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

Make DiscoveryNodes behave like a collection #83453

Merged
merged 8 commits into from
Feb 4, 2022

Conversation

arteam
Copy link
Contributor

@arteam arteam commented Feb 3, 2022

Extend from AbstractCollection. Advantages:

  • Optimized version of spliterator based on the collection size which is implemented in AbstractCollection by default.
  • Exposed stream method, so consumers don't need to call StreamSupport.stream(discoveryNodes.spliterator(), false)

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 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
@arteam
Copy link
Contributor Author

arteam commented Feb 3, 2022

@elasticmachine update branch

@arteam
Copy link
Contributor Author

arteam commented Feb 3, 2022

@elasticmachine update branch

@arteam arteam marked this pull request as ready for review February 4, 2022 08:55
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team label Feb 4, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@idegtiarenko idegtiarenko left a comment

Choose a reason for hiding this comment

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

👍

@arteam
Copy link
Contributor Author

arteam commented Feb 4, 2022

@elasticmachine update branch

@arteam
Copy link
Contributor Author

arteam commented Feb 4, 2022

@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample

1 similar comment
@arteam
Copy link
Contributor Author

arteam commented Feb 4, 2022

@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample

@arteam arteam merged commit 5afa349 into elastic:master Feb 4, 2022
@arteam arteam deleted the discovery-node-collection branch February 4, 2022 12:23
@arteam 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
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 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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants