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



##########
File path: 
modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/BaselineCommand.java
##########
@@ -166,13 +175,37 @@ 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(resolvedAddr -> new 
VisorTaskUtils.SortableAddress(resolvedAddr.getAddr())))
+                    .map(resolvedAddr -> {
+                        if 
(!resolvedAddr.getHostname().equals(resolvedAddr.getAddr()))
+                            return resolvedAddr.getHostname() + "/" + 
resolvedAddr.getAddr();
+                        else return resolvedAddr.getAddr();

Review comment:
       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]


Reply via email to