-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Serialize NodesInfoRequest as a set of strings #53140
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
williamrandolph
merged 11 commits into
elastic:master
from
williamrandolph:nodes-info-requests-refactor
Mar 6, 2020
Merged
Serialize NodesInfoRequest as a set of strings #53140
williamrandolph
merged 11 commits into
elastic:master
from
williamrandolph:nodes-info-requests-refactor
Mar 6, 2020
Conversation
This file contains hidden or 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
For Node Info to be pluggable, NodesInfoRequest must be able to carry arbitrary strings. This commit reworks the internals of that class to use a set rather than hard-coded boolean fields.
NodesInfoRequest defaults to specifying all values. We need to test for this behavior as we refactor. Also, we can use random testing for the various combinations of metrics rather than having individual tests for each metric.
Pinging @elastic/es-core-infra (:Core/Infra/Plugins) |
pugnascotia
reviewed
Mar 5, 2020
server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java
Show resolved
Hide resolved
pugnascotia
reviewed
Mar 5, 2020
...er/src/test/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestTests.java
Show resolved
Hide resolved
pugnascotia
approved these changes
Mar 5, 2020
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.
Couple of suggestions, but LGTM.
williamrandolph
commented
Mar 5, 2020
...er/src/test/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestTests.java
Outdated
Show resolved
Hide resolved
rjernst
approved these changes
Mar 5, 2020
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. A few small suggestions
server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java
Show resolved
Hide resolved
...er/src/test/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestTests.java
Show resolved
Hide resolved
williamrandolph
added a commit
that referenced
this pull request
Mar 6, 2020
For Node Info to be pluggable, NodesInfoRequest must be able to carry arbitrary strings. This commit reworks the internals of that class to use a set rather than hard-coded boolean fields. NodesInfoRequest defaults to specifying all values. We test for this behavior as we refactor and use random testing for the various combinations of metrics. Add backwards compatibility for transport requests.
This was referenced Mar 6, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
If the nodes info endpoint is going to be pluggable, the
NodesInfoRequest
class needs to support flexible lists of metrics rather than a fixed group of boolean flags. This PR refactors theNodesInfoRequest
class so that its serialization will be capable of carrying such lists.It does not change the external API of the
NodesInfoRequest
class. This will be done in a follow-up PR. I want to keep this PR as small as I can in case I have misunderstood anything important about backwards compatibility for the transport protocol.This PR also adds some granular unit tests that I used to make sure that the class's behavior didn't change.
Relates #52975