hfutatzhanghb commented on code in PR #7304:
URL: https://github.com/apache/hadoop/pull/7304#discussion_r1998206928
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/RouterAsyncRpcClient.java:
##########
@@ -479,6 +488,76 @@ public <T extends RemoteLocationContext, R> Map<T, R>
invokeConcurrent(
return asyncReturn(Map.class);
}
+ @SuppressWarnings("unchecked")
+ public <T extends RemoteLocationContext, R> List<RemoteResult<T, R>>
invokeConcurrent(
+ final Collection<T> locations, final RemoteMethod method,
+ boolean standby, long timeOutMs,
+ Class<R> clazz) throws IOException {
+
+ final UserGroupInformation ugi = RouterRpcServer.getRemoteUser();
+ final Method m = method.getMethod();
+
+ if (locations.isEmpty()) {
+ throw new IOException("No remote locations available");
+ } else if (locations.size() == 1 && timeOutMs <= 0) {
+ // Shortcut, just one call
+ return invokeSingle(locations.iterator().next(), method);
+ }
+ // Don't acquire CONCURRENT_NS permit here.
+ RouterRpcFairnessPolicyController controller =
getRouterRpcFairnessPolicyController();
+
Review Comment:
Do extra logic in RouterAsyncRpcFairnessPolicyController#acquirePermit.
when nsid equals CONCURRENT_NS, return true and in
RouterAsyncRpcFairnessPolicyController#releasePermit return immediately when
nsid equals CONCURRENT_NS.
--
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]