sanpwc commented on a change in pull request #8351:
URL: https://github.com/apache/ignite/pull/8351#discussion_r504777110
##########
File path:
modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/BaselineCommand.java
##########
@@ -166,13 +192,34 @@ else if (res.getRemainingTimeToBaselineAdjust() < 0)
Map<String, VisorBaselineNode> srvs = res.getServers();
// if task runs on a node with VisorBaselineNode of old version (V1)
we'll get order=null for all nodes.
+ Function<VisorBaselineNode, String> extractFormattedAddrs = node -> {
+ Stream<String> sortedByIpHosts =
+ Optional.ofNullable(node)
+ .map(addrs -> node.getAddrs())
+ .orElse(Collections.emptyList())
+ .stream()
+ .sorted(Comparator.comparing(tuple -> new
VisorTaskUtils.SortableAddress(tuple.getKey())))
+ .map(addr -> {
+ if (!addr.getKey().equals(addr.getValue()))
+ return addr.getValue() + "/" + addr.getKey();
+ else return addr.getKey();
+ });
+
+ if (verbose) {
+ String hosts = String.join(",",
sortedByIpHosts.collect(Collectors.toList()));
+ if (!hosts.isEmpty())
+ return ", Addresses=" + hosts;
+ else return "";
Review comment:
Same, empty line is required before "else return "";"
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]