Hexiaoqiao commented on a change in pull request #2241:
URL: https://github.com/apache/hadoop/pull/2241#discussion_r476127785
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
##########
@@ -218,6 +211,28 @@ public static InetSocketAddress createSocketAddr(String
target,
return createSocketAddrForHost(host, port);
}
+ private static final Map<String, URI> URI_CACHE = new ConcurrentHashMap<>();
Review comment:
Thanks @1996fanrui for your proposal here.
A. Not sure if this improvement could impact some other modules because
{{NetUtil}} is very common util for different modules rather than DFSClient
only.
B. It is better to make the scope to DFSClient only if we could based on the
original description
[HADOOP-17222](https://issues.apache.org/jira/browse/HADOOP-17222).
C. add evict policy for {{URI_CACHE}}?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]