sanpwc commented on a change in pull request #8351:
URL: https://github.com/apache/ignite/pull/8351#discussion_r504776438



##########
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())

Review comment:
       According to our code style we should add empty line before if here.
   Just in case, here are guidelines 
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-Whitespacesandemptylines




----------------------------------------------------------------
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]


Reply via email to