[ADH-4409] Implement new cluster API endpoints#46
Merged
Conversation
| @Override | ||
| public SearchResult<EntityT> search(RequestT searchRequest, PageRequest<ColumnT> pageRequest) { | ||
| MutableLong filteredEntitiesCount = new MutableLong(); | ||
| Stream<EntityT> fileteredStream = filteredStream(searchRequest) |
| } | ||
|
|
||
| @Override | ||
| protected Stream<NodeCmdletMetrics> allEntitiesStream() { |
There was a problem hiding this comment.
do you really need to start return stream here? May be use Collection and get stream directly in filteredStream method?
Member
Author
There was a problem hiding this comment.
I agree, Collection would be more suitable for the ClusterNodesManager. However, returning a Stream would allow future possible implementations of the SearchableInMemoryService to operate on lazy streams without the need to load all entities into memory immediately.
VitekArkhipov
approved these changes
May 28, 2024
RomaZe
approved these changes
May 28, 2024
SidorovGreg
approved these changes
May 28, 2024
SidorovGreg
reviewed
May 28, 2024
Comment on lines
49
to
52
| if (CollectionUtils.isEmpty(sortColumns)) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Probably better to return emply list
Member
Author
There was a problem hiding this comment.
In this case, null and empty lists are equal in terms of signalling the absence of sorting fields. However, replaced it with a more conventional empty list
denissinkov
approved these changes
May 28, 2024
SidorovGreg
approved these changes
May 29, 2024
b0fe927 to
5055df9
Compare
5055df9 to
89ae8ca
Compare
iamlapa
approved these changes
May 31, 2024
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.
SearchableInMemoryServicein order to be able to query services with in memory content in the same way as searchable DAOsClusterNodesManager