jianghuazhu commented on code in PR #4659:
URL: https://github.com/apache/hadoop/pull/4659#discussion_r933773424
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java:
##########
@@ -1351,6 +1357,33 @@ private class ResponseParams {
@Override
public String toString() {
+ boolean isCallerContextEnabled = conf.getBoolean(
+ HADOOP_CALLER_CONTEXT_ENABLED_KEY,
+ HADOOP_CALLER_CONTEXT_ENABLED_DEFAULT);
+ CallerContext context = getCallerContext();
+ if (isCallerContextEnabled && context != null &&
context.isContextValid()) {
+ String cc = context.getContext();
+ String clientIp = "";
+ String ipKey = CallerContext.CLIENT_IP_STR +
Review Comment:
I don't think there is a conflict with HDFS-13248 here.
For Router, it will always pass Clientip and port to CallerContext, but
NameNode may not always use it, which is not a problem with isProxyUsers.
Logging the Clientip in the log file would look clearer.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]