anuengineer commented on a change in pull request #70: HDDS-1643. Send hostName 
also part of OMRequest.
URL: https://github.com/apache/hadoop-ozone/pull/70#discussion_r341284560
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/OMClientRequest.java
 ##########
 @@ -170,6 +171,22 @@ public InetAddress getRemoteAddress() throws IOException {
     }
   }
 
+  /**
+   * Return String created from OMRequest userInfo. If userInfo is not
+   * set, returns null.
+   * @return String
+   * @throws IOException
+   */
+  @VisibleForTesting
+  public String getHostName() throws IOException {
+    if (omRequest.hasUserInfo()) {
+      return InetAddress.getByName(omRequest.getUserInfo()
 
 Review comment:
   This will return the cannonical host name. Say you say -- host1--> this call 
will resolve it with DNS or hosts and return the full host name. Another use 
case, which might not be applicable for us is that the name might be short name 
or IP address. This ends up looking the right name from the network layer. That 
is all; I will hold off on committing this since it is night for @cxorm .

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to