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



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineNode.java
##########
@@ -105,10 +127,71 @@ public String getConsistentId() {
 
         if (protoVer >= V2)
             order = (Long)in.readObject();
+
+        if (protoVer >= V3) {
+            Collection<ResolvedAddresses> inputAddrs = U.readCollection(in);
+            if (inputAddrs != null) addrs = inputAddrs;
+        }
     }
 
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorBaselineNode.class, this);
     }
+
+    /**
+     * Simple data class for storing (hostname, address) pairs
+     */
+    public static class ResolvedAddresses extends IgniteDataTransferObject {
+
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /** */
+        private String hostname;
+
+        /** Textual representation of IP address. */
+        private String addr;
+
+        /**
+         * @param inetAddr Inet address.
+         */
+        public ResolvedAddresses(InetAddress inetAddr) {
+            this.hostname = inetAddr.getHostName();
+            this.addr = inetAddr.getHostAddress();
+        }
+
+        /**
+         * Default constructor.
+         */
+        public ResolvedAddresses() {}
+
+        /**
+         * @return Hostname.
+         */
+        public String getHostname() {

Review comment:
       According to our guideline we should use gg-styled getters and setters 
wherever possible.
   ![Screenshot from 2020-10-16 
13-13-50](https://user-images.githubusercontent.com/18287137/96246861-efb24d80-0fb1-11eb-9cc7-85dfb96e958b.png)
   ```
           /**
            * @return Hostname.
            */
           public String hostname() {
               return hostname;
           }
   
           /**
            * @param hostname New hostname.
            */
           public void hostname(String hostname) {
               this.hostname = hostname;
           }
   ```




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