adoroszlai commented on code in PR #4153:
URL: https://github.com/apache/ozone/pull/4153#discussion_r1064538150


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java:
##########
@@ -195,6 +195,15 @@ public String getHostName() {
     return hostName;
   }
 
+  /**
+   * Returns the Hostname and IP of the datanode separated by a slash.
+   *
+   * Eg: datanode001.corp/192.168.0.123
+   */
+  public String getHostNameAndIP() {
+    return getHostName() + "/" + getIpAddress();

Review Comment:
   I would love to make this (or UUID + this) the default toString, and 
renaming the existing more verbose toString to something like `toDebugString`.  
This way we could avoid having to convert manually in all places, and use the 
verbose one explicitly if needed.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to