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



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

Reply via email to