hfutatzhanghb commented on code in PR #7304:
URL: https://github.com/apache/hadoop/pull/7304#discussion_r1998617370
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/RouterAsyncRpcClient.java:
##########
@@ -214,45 +219,47 @@ private void invokeMethodAsync(
final ExecutionStatus status = new ExecutionStatus(false, useObserver);
Map<FederationNamenodeContext, IOException> ioes = new LinkedHashMap<>();
final ConnectionContext[] connection = new ConnectionContext[1];
- asyncForEach(namenodes.iterator(),
- (foreach, namenode) -> {
- if (!status.isShouldUseObserver()
- && (namenode.getState() ==
FederationNamenodeServiceState.OBSERVER)) {
- asyncComplete(null);
- return;
- }
- String nsId = namenode.getNameserviceId();
- String rpcAddress = namenode.getRpcAddress();
- asyncTry(() -> {
- connection[0] = getConnection(ugi, nsId, rpcAddress, protocol);
- NameNodeProxiesClient.ProxyAndInfo<?> client =
connection[0].getClient();
- invoke(namenode, status.isShouldUseObserver(), 0, method,
+ asyncTry(() -> {
+ asyncForEach(namenodes.iterator(),
Review Comment:
Have fixed. Thanks a lot.
--
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]