-
Notifications
You must be signed in to change notification settings - Fork 5
[ADH-4409] Implement new cluster API endpoints #46
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
Conversation
| @Override | ||
| public SearchResult<EntityT> search(RequestT searchRequest, PageRequest<ColumnT> pageRequest) { | ||
| MutableLong filteredEntitiesCount = new MutableLong(); | ||
| Stream<EntityT> fileteredStream = filteredStream(searchRequest) |
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.
typo in fileteredStream
| } | ||
|
|
||
| @Override | ||
| protected Stream<NodeCmdletMetrics> allEntitiesStream() { |
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.
do you really need to start return stream here? May be use Collection and get stream directly in filteredStream method?
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 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.
| if (CollectionUtils.isEmpty(sortColumns)) { | ||
| return null; | ||
| } |
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.
Probably better to return emply list
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.
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
b0fe927 to
5055df9
Compare
5055df9 to
89ae8ca
Compare
SearchableInMemoryServicein order to be able to query services with in memory content in the same way as searchable DAOsClusterNodesManager