[ 
https://issues.apache.org/jira/browse/HDFS-16369?focusedWorklogId=689727&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-689727
 ]

ASF GitHub Bot logged work on HDFS-16369:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Dec/21 02:25
            Start Date: 03/Dec/21 02:25
    Worklog Time Spent: 10m 
      Work Description: goiri commented on a change in pull request #3745:
URL: https://github.com/apache/hadoop/pull/3745#discussion_r761603855



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java
##########
@@ -716,26 +718,23 @@ static String getMethodName() {
     if (nss.isEmpty()) {
       throw ioe;
     }
-    String nsId = nss.iterator().next().getNameserviceId();
-    return rpcClient.invokeSingle(nsId, method, clazz);
-  }
-
-  /**
-   * Get set of namespace info's removing the already invoked namespaceinfo.
-   * @param nss List of namespaces in the federation.
-   * @param nsId Already invoked namespace id.
-   * @return List of name spaces in the federation on
-   * removing the already invoked namespaceinfo.
-   */
-  private static Set<FederationNamespaceInfo> getNameSpaceInfo(
-      final Set<FederationNamespaceInfo> nss, final String nsId) {
-    Set<FederationNamespaceInfo> namespaceInfos = new HashSet<>();
-    for (FederationNamespaceInfo ns : nss) {
-      if (!nsId.equals(ns.getNameserviceId())) {
-        namespaceInfos.add(ns);
+    for (Iterator<FederationNamespaceInfo> it = nss.iterator(); it

Review comment:
       If we are going to loop over, can we just do:
   for (String nsId : nss)
   ?

##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterRPCMultipleDestinationMountTableResolver.java
##########
@@ -668,14 +674,16 @@ public void testInvokeAtAvailableNs() throws IOException {
     // Make one subcluster unavailable.
     MiniDFSCluster dfsCluster = cluster.getCluster();
     dfsCluster.shutdownNameNode(0);
+    dfsCluster.shutdownNameNode(1);
     try {
       // Verify that #invokeAtAvailableNs works by calling #getServerDefaults.
       RemoteMethod method = new RemoteMethod("getServerDefaults");
       FsServerDefaults serverDefaults =
           rpcServer.invokeAtAvailableNs(method, FsServerDefaults.class);
       assertNotNull(serverDefaults);

Review comment:
       Is there something else we can assert? Any metrics?




-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 689727)
    Time Spent: 0.5h  (was: 20m)

> RBF: Fix the retry logic of RouterRpcServer#invokeAtAvailableNs
> ---------------------------------------------------------------
>
>                 Key: HDFS-16369
>                 URL: https://issues.apache.org/jira/browse/HDFS-16369
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> As of now invokeAtAvailableNs, retries only once if the default or the first 
> namespace is not available, despite having other namespaces available.
> Optimise to retry on all namespaces.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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