[ 
https://issues.apache.org/jira/browse/HDFS-16925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690497#comment-17690497
 ] 

ASF GitHub Bot commented on HDFS-16925:
---------------------------------------

virajjasani commented on PR #5407:
URL: https://github.com/apache/hadoop/pull/5407#issuecomment-1434946565

   We have both options: test regex can be fixed as this is lock held info and 
it is not considered stable as per compatibility guidelines.
   Or if we don't want to include hostname, this change can be made too:
   ```
   diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
   index aef62faf793..4b0e0203fa7 100644
   -

> Namenode audit log to only include IP address of client
> -------------------------------------------------------
>
>                 Key: HDFS-16925
>                 URL: https://issues.apache.org/jira/browse/HDFS-16925
>             Project: Hadoop HDFS
>          Issue Type: Task
>            Reporter: Viraj Jasani
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>
> With HADOOP-18628 in place, we perform InetAddress#getHostName in addition to 
> InetAddress#getHostAddress, to save host name with IPC Connection object. 
> When we perform InetAddress#getHostName, toString() of InetAddress would 
> automatically print \{hostName}/\{hostIPAddress} if hostname is already 
> resolved:
> {code:java}
> /**
>  * Converts this IP address to a {@code String}. The
>  * string returned is of the form: hostname / literal IP
>  * address.
>  *
>  * If the host name is unresolved, no reverse name service lookup
>  * is performed. The hostname part will be represented by an empty string.
>  *
>  * @return  a string representation of this IP address.
>  */
> public String toString() {
>     String hostName = holder().getHostName();
>     return ((hostName != null) ? hostName : "")
>         + "/" + getHostAddress();
> }{code}
>  
> For namenode audit logs, this means that when dfs client makes filesystem 
> updates, the audit logs would also print host name in the audit logs in 
> addition to ip address. We have some tests that performs regex pattern 
> matching to identify the log pattern of audit logs, we will have to change 
> them to reflect the change in host address.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to