Skip to content

Commit

Permalink
Removed wrapper map in adapter function
Browse files Browse the repository at this point in the history
Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
shiv0408 committed Oct 6, 2023
1 parent fe0cd15 commit f12a921
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,11 @@ private MatchingNodes findMatchingNodes(

private Map<DiscoveryNode, StoreFilesMetadata> adaptToNodeShardStores(AsyncShardFetch.FetchResult<NodeStoreFilesMetadata> data) {
assert data.hasData();
return new HashMap<>(
data.getData().entrySet().stream()
.collect(
Collectors.toMap(
Map.Entry::getKey,
entry -> entry.getValue().storeFilesMetadata()
)
)
return data.getData().entrySet().stream().collect(
Collectors.toMap(
Map.Entry::getKey,
entry -> entry.getValue().storeFilesMetadata()
)
);
}

Expand Down

0 comments on commit f12a921

Please sign in to comment.