sanpwc commented on a change in pull request #8351:
URL: https://github.com/apache/ignite/pull/8351#discussion_r505420884
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineTaskResult.java
##########
@@ -75,7 +83,38 @@ public VisorBaselineTaskResult() {
Map<String, VisorBaselineNode> map = new TreeMap<>();
for (BaselineNode node : nodes) {
- VisorBaselineNode dto = new VisorBaselineNode(node);
+
+ VisorBaselineNode dto = new VisorBaselineNode(node,
Collections.emptyList());
+
+ map.put(dto.getConsistentId(), dto);
+ }
+
+ return map;
+ }
+
+ /**
+ * @param nodes Nodes to process.
+ * @return Map of DTO objects, with resolved ip->hostname pairs.
+ */
+ private static Map<String, VisorBaselineNode>
toMapWithResolvedAddresses(Collection<? extends BaselineNode> nodes) {
+ if (F.isEmpty(nodes))
+ return null;
+
+ Map<String, VisorBaselineNode> map = new TreeMap<>();
+
+ for (BaselineNode node : nodes) {
+ Collection<IgniteBiTuple<String, String>> addrs =
Collections.emptyList();
+ if (node instanceof IgniteClusterNode) {
+ try {
+ addrs =
IgniteUtils.toInetAddresses((ClusterNode)node).stream()
+ .map(addr -> new
IgniteBiTuple<>(addr.getHostAddress(), addr.getHostName()))
+ .collect(Collectors.toList());
+ } catch (IgniteCheckedException ex) {
Review comment:
}
catch (IgniteCheckedException ex) {
throw IgniteUtils.convertException(ex);
}
----------------------------------------------------------------
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]