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 04:05:53 UTC

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

1996fanrui commented on a change in pull request #2241:
URL: https://github.com/apache/hadoop/pull/2241#discussion_r476140378



##########
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:
       Hi @Hexiaoqiao , thank you very much for your suggestions.
   AB. Now Cache is just URI, URI object does not contain ip, only some fixed information. The same target corresponds to the same URI. If the URI contains some variable attributes, I think the current Cache may impact other modules, and even the hdfs client will also be affected. According to my understanding, cache URI should be safe.
   C. Is `evict policy` considering that the URI will change? Or consider it may take up more memory?




----------------------------------------------------------------
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