-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Use HashMap in admin get actions #87938
Use HashMap in admin get actions #87938
Conversation
Actions for getting aliases, indices, and settings all return a Map. Yet internally these unnecessarily ImmutableOpenMap. This commit converts these actions to use HashMap. relates elastic#86239
Pinging @elastic/es-distributed (Team:Distributed) |
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, one nit
.findDataStreams(concreteIndices) | ||
.entrySet() | ||
.stream() | ||
.collect(Collectors.toMap(Map.Entry::getKey, v -> v.getValue().getName())) |
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 think this can just be Collectors.toUnmodifiableMap(
?
@elasticmachine run elasticsearch-ci/packaging-tests-windows-sample |
Actions for getting aliases, indices, and settings all return a Map. Yet
internally these unnecessarily ImmutableOpenMap. This commit converts
these actions to use HashMap.
relates #86239