totalo commented on a change in pull request #15977:
URL: https://github.com/apache/shardingsphere/pull/15977#discussion_r823797196
##########
File path:
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/instance/InstanceContext.java
##########
@@ -141,13 +144,13 @@ public void deleteComputeNodeInstance(final
ComputeNodeInstance instance) {
* @param labels collection of contained label
* @return compute node instances
*/
- public Collection<ComputeNodeInstance> getComputeNodeInstances(final
InstanceType instanceType, final Collection<String> labels) {
- Collection<ComputeNodeInstance> result = new
ArrayList<>(computeNodeInstances.size());
- computeNodeInstances.forEach(each -> {
- if (each.getInstanceDefinition().getInstanceType() == instanceType
&& each.getLabels().stream().anyMatch(labels::contains)) {
- result.add(each);
+ public List<InstanceId> getComputeNodeInstanceIds(final InstanceType
instanceType, final Collection<String> labels) {
Review comment:
Collection maybe better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]