You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/12/01 14:20:00 UTC

[jira] [Commented] (YARN-11358) [Federation] Add FederationInterceptor#allow-partial-result config.

    [ https://issues.apache.org/jira/browse/YARN-11358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17641950#comment-17641950 ] 

ASF GitHub Bot commented on YARN-11358:
---------------------------------------

slfan1989 commented on code in PR #5056:
URL: https://github.com/apache/hadoop/pull/5056#discussion_r1037165134


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/webapp/TestFederationInterceptorRESTRetry.java:
##########
@@ -380,10 +385,20 @@ public void testGetNodeOneBadOneGood()
   @Test
   public void testGetNodesOneBadSC() throws Exception {
 
+    // allowPartialResult = true,
+    // We tolerate exceptions and return normal results
+    interceptor.setAllowPartialResult(true);
     setupCluster(Arrays.asList(bad2));
 
-    LambdaTestUtils.intercept(YarnRuntimeException.class, "RM is stopped",

Review Comment:
   Thank you very much for reviewing the code, I will add new unit tests.





> [Federation] Add FederationInterceptor#allow-partial-result config.
> -------------------------------------------------------------------
>
>                 Key: YARN-11358
>                 URL: https://issues.apache.org/jira/browse/YARN-11358
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: federation, router
>    Affects Versions: 3.4.0
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>              Labels: pull-request-available
>
> 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.
> But 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
> We'd better add a parameter control, the user chooses whether to report an error or return the result.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org