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

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

                Author: ASF GitHub Bot
            Created on: 02/Jul/22 19:00
            Start Date: 02/Jul/22 19:00
    Worklog Time Spent: 10m 
      Work Description: ayushtkn commented on code in PR #4524:
URL: https://github.com/apache/hadoop/pull/4524#discussion_r912390702


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java:
##########
@@ -1012,6 +1013,9 @@ public <R extends RemoteLocationContext, T> RemoteResult 
invokeSequential(
           // Valid result, stop here
           @SuppressWarnings("unchecked") R location = (R) loc;
           @SuppressWarnings("unchecked") T ret = (T) result;
+          if (ret instanceof LastBlockWithStatus) {
+            ((LastBlockWithStatus) ret).getFileStatus().setNamespace(ns);
+          }

Review Comment:
   Is this for append? Then No I don't think we should do this for all other 
API, should restrict our changes to only Append code.
   Check if changing the Append code in ``RouterClientProtocol`` helps:
   
   ```
     @Override
     public LastBlockWithStatus append(String src, final String clientName,
         final EnumSetWritable<CreateFlag> flag) throws IOException {
       rpcServer.checkOperation(NameNode.OperationCategory.WRITE);
   
       List<RemoteLocation> locations = rpcServer.getLocationsForPath(src, 
true);
       RemoteMethod method = new RemoteMethod("append",
           new Class<?>[] {String.class, String.class, EnumSetWritable.class},
           new RemoteParam(), clientName, flag);
       RemoteResult result = rpcClient
           .invokeSequential(method, locations, LastBlockWithStatus.class, 
null);
       LastBlockWithStatus lbws = (LastBlockWithStatus) result.getResult();
       
lbws.getFileStatus().setNamespace(result.getLocation().getNameserviceId());
       return lbws;
     }
   ```





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

    Worklog Id:     (was: 787346)
    Time Spent: 3h 10m  (was: 3h)

> RBF: improve renewLease() to call only a specific NameNode rather than make 
> fan-out calls
> -----------------------------------------------------------------------------------------
>
>                 Key: HDFS-16283
>                 URL: https://issues.apache.org/jira/browse/HDFS-16283
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: rbf
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: RBF_ improve renewLease() to call only a specific 
> NameNode rather than make fan-out calls.pdf
>
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Currently renewLease() against a router will make fan-out to all the 
> NameNodes. Since renewLease() call is so frequent and if one of the NameNodes 
> are slow, then eventually the router queues are blocked by all renewLease() 
> and cause router degradation. 
> We will make a change in the client side to keep track of NameNode Id in 
> additional to current fileId so routers understand which NameNodes the client 
> is renewing lease against.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to