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 "Tao Li (Jira)" <ji...@apache.org> on 2023/02/21 00:36:00 UTC

[jira] [Resolved] (HDFS-16925) Namenode audit log to only include IP address of client

     [ https://issues.apache.org/jira/browse/HDFS-16925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tao Li resolved HDFS-16925.
---------------------------
    Fix Version/s: 3.4.0
                   3.3.9
       Resolution: Fixed

> 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
>             Fix For: 3.4.0, 3.3.9
>
>
> 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.
> In order to maintain the compatibility, the purpose of this Jira is to only let audit log retrieve IP address from InetAddress and print it.



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

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