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; } ``` -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org