RaigorJiang commented on a change in pull request #15036:
URL: https://github.com/apache/shardingsphere/pull/15036#discussion_r791313157
##########
File path:
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/common/show/executor/ShowInstanceExecutor.java
##########
@@ -78,24 +80,26 @@ protected MergedResult createMergedResult() {
private Collection<List<Object>> buildInstanceRows() {
List<List<Object>> result = new LinkedList<>();
InstanceId instanceId =
ProxyContext.getInstance().getContextManager().getInstanceContext().getInstance().getInstanceDefinition().getInstanceId();
- result.add(buildRow(instanceId.getId(), ENABLE));
+ result.add(buildRow(instanceId.getId(), ENABLE,
Collections.emptyList()));
return result;
}
private Collection<List<Object>> buildInstanceRows(final
MetaDataPersistService persistService) {
Collection<ComputeNodeInstance> instances =
persistService.getComputeNodePersistService().loadAllComputeNodeInstances();
if (!instances.isEmpty()) {
- return instances.stream().filter(Objects::nonNull).map(each ->
buildRow(each.getInstanceDefinition().getInstanceId().getId(),
getStatus(each.getStatus())))
+ return instances.stream().filter(Objects::nonNull)
+ .map(each ->
buildRow(each.getInstanceDefinition().getInstanceId().getId(),
getStatus(each.getStatus()), each.getLabels()))
.collect(Collectors.toCollection(LinkedList::new));
}
return Collections.emptyList();
}
- private List<Object> buildRow(final String instanceId, final String
status) {
+ private List<Object> buildRow(final String instanceId, final String
status, final Collection<String> labelCollection) {
Review comment:
I think `labels` for the last param is better than `labelCollection`.
--
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]