-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
NodeStats classes to implement Writeable rather then Streamable #20327
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
d31bcfd
to
262261b
Compare
Closed
breaker = AllCircuitBreakerStats.readOptionalAllCircuitBreakerStats(in); | ||
scriptStats = in.readOptionalStreamable(ScriptStats::new); | ||
discoveryStats = in.readOptionalStreamable(() -> new DiscoveryStats(null)); | ||
os = in.readOptionalWriteable(OsStats::new); |
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.
I like how github put this part up front. Very nice.
I left a few minor comments, LGTM otherwise. |
assertEquals(mem.getNonHeapUsed(), deserializedMem.getNonHeapUsed()); | ||
assertEquals(mem.getHeapMax(), deserializedMem.getHeapMax()); | ||
JvmStats.Classes classes = jvm.getClasses(); | ||
assertEquals(classes.getLoadedClassCount(), deserializedJvm.getClasses().getLoadedClassCount()); |
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.
Much nicer! Thanks.
bd4db4d
to
0b0168b
Compare
also removed null checks in toXContent for subobjects that cannot be null and added @nullable annotation for memory pools
Also removed ScriptStats#add method which was unused
…ther than Streamable
… rather than Streamable
…inal FsInfo#total is removed in favour of getTotal, which allows to retrieve the total value [TEST] fix FsProbeTests: null is not accepted as path constructor argument
Without the getters there is no way to retrieve the values for its instance members from the java api, they only get printed out on the REST layer
…vent too much line wrapping
0b0168b
to
dd9b29b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This allows to make all the instance members final , which also prevents silly errors from happening (e.g. missing assignment when reading from the stream).
Added also an extensive serialization test that was missing before.