Cleanup random stats serialization code#22223
Merged
s1monw merged 5 commits intoelastic:masterfrom Dec 17, 2016
Merged
Conversation
Some of our stats serializatoin code duplicates complicated seriazliation logic or could use existing building blocks from StreamOutput/Input. This commit cleans up some of the serialization code.
jasontedor
approved these changes
Dec 16, 2016
| docs, store, indexing, get, search, merge, refresh, flush, warmer, queryCache, | ||
| fieldData, completion, segments, translog, requestCache, recoveryStats}) | ||
| .filter(Objects::nonNull); | ||
| for (ToXContent toXContent : stream::iterator) { |
Member
There was a problem hiding this comment.
I don't think this can compile?
Member
There was a problem hiding this comment.
I think it would require a cast though, what am I missing?
| static final String MEMORY_SIZE = "memory_size"; | ||
| static final String MEMORY_SIZE_IN_BYTES = "memory_size_in_bytes"; | ||
| static final String EVICTIONS = "evictions"; | ||
| static final String FIELDS = "fields"; |
Member
There was a problem hiding this comment.
Can all of these fields be private?
| package org.elasticsearch.index.fielddata; | ||
|
|
||
| import com.carrotsearch.hppc.ObjectLongHashMap; | ||
| import com.carrotsearch.hppc.cursors.ObjectLongCursor; |
Member
There was a problem hiding this comment.
These imports can be dropped now?
Contributor
Author
|
@elasticmachine test this please |
s1monw
added a commit
that referenced
this pull request
Dec 17, 2016
Some of our stats serialization code duplicates complicated seriazliation logic or could use existing building blocks from StreamOutput/Input. This commit cleans up some of the serialization code.
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
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.
Some of our stats serialization code duplicates complicated serialization logic
or could use existing building blocks from StreamOutput/Input. This commit
cleans up some of the serialization code.