This is an automated email from the ASF dual-hosted git repository. tomscut pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.3 by this push: new e47ff5f3c05 HDFS-16925. Namenode audit log to only include IP address of client (#5413) e47ff5f3c05 is described below commit e47ff5f3c05278b5735159d13fa3b2291f7528f4 Author: Viraj Jasani <vjas...@apache.org> AuthorDate: Mon Feb 20 16:33:54 2023 -0800 HDFS-16925. Namenode audit log to only include IP address of client (#5413) Reviewed-by: Takanobu Asanuma <tasan...@apache.org> Signed-off-by: Tao Li <toms...@apache.org> --- .../main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 aa00d05bad3..437ffab6727 100644 --- 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 @@ -8506,9 +8506,10 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, src = escapeJava(src); dst = escapeJava(dst); sb.setLength(0); + String ipAddr = addr != null ? "/" + addr.getHostAddress() : "null"; sb.append("allowed=").append(succeeded).append("\t") .append("ugi=").append(userName).append("\t") - .append("ip=").append(addr).append("\t") + .append("ip=").append(ipAddr).append("\t") .append("cmd=").append(cmd).append("\t") .append("src=").append(src).append("\t") .append("dst=").append(dst).append("\t"); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org