YARN-11358. [Federation] Add FederationInterceptor#allow-partial-result config.#5056
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
We have something similar with RBF. |
Thanks a lot for your suggestion, I refer to RBF's code, I named this optional parameter |
|
🎊 +1 overall
This message was automatically generated. |
|
@goiri Can you help review this pr? Thank you very much! |
|
|
||
| // Send the requests in parallel | ||
| CompletionService<R> compSvc = new ExecutorCompletionService<>(this.threadpool); | ||
| CompletionService<Pair<R, Exception>> compSvc = |
| if (response != null) { | ||
| results.put(clusterId, response); | ||
| } | ||
| Exception exception = pair.getRight(); |
There was a problem hiding this comment.
In the API seems to be getValue()?
|
|
||
| Configuration conf = this.getConf(); | ||
| // Enable strict mode | ||
| conf.setBoolean(YarnConfiguration.ROUTER_INTERCEPTOR_ALLOW_PARTIAL_RESULT_ENABLED, |
| badSC); | ||
| interceptor.setRunning(false); | ||
| } | ||
|
|
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@goiri Can you help review this pr again? Thank you very much! |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
| interceptor.setAllowPartialResult(true); | ||
| setupCluster(Arrays.asList(bad2)); | ||
|
|
||
| LambdaTestUtils.intercept(YarnRuntimeException.class, "RM is stopped", |
There was a problem hiding this comment.
Can we keep the old test and add a new one with the partial enabled?
There was a problem hiding this comment.
Thank you very much for reviewing the code, I will add new unit tests.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
| /** Router Interceptor Allow Partial Result Enable. **/ | ||
| public static final String ROUTER_INTERCEPTOR_ALLOW_PARTIAL_RESULT_ENABLED = | ||
| ROUTER_PREFIX + "interceptor.allow-partial-result.enable"; | ||
| public static final boolean DEFAULT_ROUTER_INTERCEPTOR_ALLOW_PARTIAL_RESULT_ENABLED = true; |
There was a problem hiding this comment.
From the other comments, I think this needs to be false
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
| } | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Thank you very much for helping to review the code, I will fix it.
|
🎊 +1 overall
This message was automatically generated. |
|
@goiri Thank you very much for helping to review the code! |
JIRA: YARN-11358. [Federation] Add FederationInterceptor#allow-partial-result config.
When we use Federation, we will have multiple sub-clusters, and some interfaces need to call all clusters to get results,
such as getNodes, getNodeToLabels, etc.
Q1 : if the sub-cluster is unavailable when we call the interface, should the interface return the result?
The current code is to return the result. If the result is returned, the result information is inaccurate;
if the result is not returned, it is not user-friendly.
Plan to add a new configuration
yarn.router.interceptor.allow-partial-result.enableIf
true, we will ignore the exception of some subClusters during the calling process, and return result.If
false, if an exception occurs in a subCluster during the calling process, an exception will be thrown directly.