slfan1989 commented on code in PR #6190:
URL: https://github.com/apache/hadoop/pull/6190#discussion_r1374748822
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationInterceptorREST.java:
##########
@@ -3371,17 +3372,19 @@ private <R> Map<SubClusterInfo, R>
invokeConcurrent(Collection<SubClusterInfo> c
}
Exception exception = result.getException();
-
- // If allowPartialResult=false, it means that if an exception occurs
in a subCluster,
- // an exception will be thrown directly.
- if (!allowPartialResult && exception != null) {
+ if (exception != null) {
throw exception;
}
} catch (Throwable e) {
String subClusterId = subClusterInfo != null ?
subClusterInfo.getSubClusterId().getId() : "UNKNOWN";
LOG.error("SubCluster {} failed to {} report.", subClusterId,
request.getMethodName(), e);
- throw new YarnRuntimeException(e.getCause().getMessage(), e);
+ // If allowPartialResult=false, it means that if an exception occurs
in a subCluster,
Review Comment:
After a careful read of the code, I have realized that allowPartialResult
hasn't been effectively utilized due to its incorrect placement. We should
evaluate whether to throw an exception in the catch block instead.
--
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]