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

 ##########
 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:
   Thanks @bharatviswa504 for the review.
   I haven't complete the patch : )
   
   Yes the implementation of getHostName in patch 015ba21 is correct, but the 
corresponding UT ```TestOMClientRequestWithUserInfo``` has a failure on L119 
```Assert.assertEquals(inetAddress.getHostName(), hostName);```.
   
   I'am going to find the cause that why the L116 can work and L119 fail.

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


With regards,
Apache Git Services

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

Reply via email to