xinglin commented on code in PR #5860:
URL: https://github.com/apache/hadoop/pull/5860#discussion_r1270146327


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -194,6 +202,18 @@ public class RouterClientProtocol implements 
ClientProtocol {
     this.routerCacheAdmin = new RouterCacheAdmin(rpcServer);
     this.securityManager = rpcServer.getRouterSecurityManager();
     this.rbfRename = new RouterFederationRename(rpcServer, conf);
+
+    this.crsNameservicesCache = CacheBuilder.newBuilder()

Review Comment:
   why do we decide to introduce a cache here? 
`isNameSapceObserverREadEligible`() does not even need to contact NN, right? It 
just checks local configs, which should be a very cheap operation. 



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

Reply via email to