You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/08/25 03:47:55 UTC

[GitHub] [hadoop] Hexiaoqiao commented on a change in pull request #2241: HADOOP-17222. Create socket address combined with cache

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:
users@infra.apache.org



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