[
https://issues.apache.org/jira/browse/HDFS-16979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17711962#comment-17711962
]
ASF GitHub Bot commented on HDFS-16979:
---------------------------------------
goiri commented on code in PR #5552:
URL: https://github.com/apache/hadoop/pull/5552#discussion_r1165749819
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -202,6 +202,7 @@
import org.apache.hadoop.fs.InvalidPathException;
import org.apache.hadoop.fs.Options;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.fs.QuotaUsage;
Review Comment:
Why?
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -461,6 +462,14 @@ private void appendClientPortToCallerContextIfAbsent() {
.append(CallerContext.CLIENT_PORT_STR,
String.valueOf(Server.getRemotePort()))
.setSignature(origSignature)
.build());
+ } else {
+ String origContext = ctx == null ? null : ctx.getContext();
+ byte[] origSignature = ctx == null ? null : ctx.getSignature();
+ CallerContext.setCurrent(
+ new CallerContext.Builder(origContext, contextFieldSeparator)
+ .append(CallerContext.DFSROUTER_PORT_STR,
String.valueOf(Server.getRemotePort()))
Review Comment:
Can we add a test?
> RBF: Add dfsrouter port in hdfsauditlog
> ---------------------------------------
>
> Key: HDFS-16979
> URL: https://issues.apache.org/jira/browse/HDFS-16979
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: liuguanghua
> Priority: Major
>
> When remote client request through dfsrouter to namenode, the hdfsauditlog
> record the remote client ip and port ,dfsrouter IP,but lack of dfsrouter port.
> This patch is done for this scene.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]