You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/06/26 21:03:16 UTC
[GitHub] [hadoop] ashutoshcipher commented on a diff in pull request #4244: YARN-11119. Backport YARN-10538 to branch-2.10
ashutoshcipher commented on code in PR #4244:
URL: https://github.com/apache/hadoop/pull/4244#discussion_r906870462
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRMRPCNodeUpdates.java:
##########
@@ -98,6 +111,47 @@ public AllocateResponse run() throws Exception {
});
}
+ @Test
+ public void testAMRMRecommissioningNodes() throws Exception {
+ MockNM nm1 = rm.registerNode("127.0.0.1:1234", 10000);
+ MockNM nm2 = rm.registerNode("127.0.0.2:1234", 10000);
+ rm.drainEvents();
+
+ RMApp app1 = rm.submitApp(2000);
+
+ // Trigger the scheduling so the AM gets 'launched' on nm1
+ nm1.nodeHeartbeat(true);
+
+ RMAppAttempt attempt1 = app1.getCurrentAppAttempt();
+ MockAM am1 = rm.sendAMLaunched(attempt1.getAppAttemptId());
+
+ // register AM returns no unusable node
+ am1.registerAppAttempt();
+
+ // DECOMMISSION nm2
+ syncNodeGracefulDecommission(nm2);
+
+ AllocateRequest allocateRequest1 =
+ AllocateRequest.newInstance(0, 0F, null, null, null);
+ AllocateResponse response1 =
+ allocate(attempt1.getAppAttemptId(), allocateRequest1);
+ List<NodeReport> updatedNodes = response1.getUpdatedNodes();
+ Assert.assertEquals(0, updatedNodes.size());
Review Comment:
@aajisaka - Updated the test case with `updatedNodes with 1 `and its passing - checked in my local after [YARN-6483](https://issues.apache.org/jira/browse/YARN-6483) is backport to branch-2.10
--
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-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org