[ 
https://issues.apache.org/jira/browse/HDFS-17596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888988#comment-17888988
 ] 

ASF GitHub Bot commented on HDFS-17596:
---------------------------------------

hfutatzhanghb commented on code in PR #6988:
URL: https://github.com/apache/hadoop/pull/6988#discussion_r1798280017


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java:
##########
@@ -824,6 +865,50 @@ <T> T invokeOnNs(RemoteMethod method, Class<T> clazz, 
IOException ioe,
     throw ioe;
   }
 
+  <T> T invokeOnNsAsync(RemoteMethod method, Class<T> clazz, IOException ioe,
+      Set<FederationNamespaceInfo> nss) throws IOException {
+    if (nss.isEmpty()) {
+      throw ioe;
+    }
+
+    asyncComplete(null);
+    Iterator<FederationNamespaceInfo> nsIterator = nss.iterator();
+    asyncForEach(nsIterator, (foreach, fnInfo) -> {
+      String nsId = fnInfo.getNameserviceId();
+      LOG.debug("Invoking {} on namespace {}", method, nsId);
+      asyncTry(() -> {
+        rpcClient.invokeSingle(nsId, method, clazz);

Review Comment:
   @KeeProMise Sir, Thanks for your reviewing and pointing out the problem,  i 
will fix it soonly.





> [ARR] RouterStoragePolicy supports asynchronous rpc.
> ----------------------------------------------------
>
>                 Key: HDFS-17596
>                 URL: https://issues.apache.org/jira/browse/HDFS-17596
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Jian Zhang
>            Assignee: farmmamba
>            Priority: Major
>              Labels: pull-request-available
>
> *Describe*
> The main new addition is RouterAsyncStoragePolicy, which extends 
> RouterStoragePolicy so that supports asynchronous rpc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to