You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/10/31 17:39:05 UTC

[GitHub] [hadoop-ozone] bharatviswa504 commented on a change in pull request #70: HDDS-1643. Send hostName also part of OMRequest.

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

 ##########
 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:
   Here why do we need this, we can direcly return hostName which we have in UserInfo
   omRequest.getUserInfo().getHostName() right? Not sure if i am missing something here.

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


With regards,
Apache Git Services

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