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


##########
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'm fine with adding UUID into the string too. It would solve the problem 
with mini-cluster where all the nodes are on the same host / IP. I wonder if 
anything would break if we changed the default datanode details to string? 
Almost everywhere it is logged, we don't call about all the verbose info it 
currently includes. We really just want to the host / IP / ID.



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