[
https://issues.apache.org/jira/browse/YARN-11566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765128#comment-17765128
]
ASF GitHub Bot commented on YARN-11566:
---------------------------------------
slfan1989 commented on code in PR #6068:
URL: https://github.com/apache/hadoop/pull/6068#discussion_r1325828055
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/TestFederationInterceptor.java:
##########
@@ -1449,4 +1452,78 @@ public void
testLaunchUAMAndRegisterApplicationMasterRetry() throws Exception {
Assert.assertEquals(0, interceptor.getRetryCount());
}
+
+ @Test
+ public void testDownWithKillUnManagedApplication() throws IOException,
InterruptedException {
+ UserGroupInformation ugi =
+ interceptor.getUGIWithToken(interceptor.getAttemptId());
+ ugi.doAs((PrivilegedExceptionAction<Object>) () -> {
+ // Register the application
+ RegisterApplicationMasterRequest registerReq =
+ Records.newRecord(RegisterApplicationMasterRequest.class);
+ registerReq.setHost(Integer.toString(testAppId));
+ registerReq.setRpcPort(0);
+ registerReq.setTrackingUrl("");
+
+ RegisterApplicationMasterResponse registerResponse =
+ interceptor.registerApplicationMaster(registerReq);
+ Assert.assertNotNull(registerResponse);
+ lastResponseId = 0;
+
+ Assert.assertEquals(0, interceptor.getUnmanagedAMPoolSize());
+
+ // Allocate the first batch of containers, with sc1 and sc2 active
+ registerSubCluster(SubClusterId.newInstance("SC-1"));
+ registerSubCluster(SubClusterId.newInstance("SC-2"));
+
+ int numberOfContainers = 3;
+ List<Container> containers =
+ getContainersAndAssert(numberOfContainers, numberOfContainers * 2);
+ Assert.assertEquals(2, interceptor.getUnmanagedAMPoolSize());
+
+ // Allocate the second batch of containers, with sc1 and sc3 active
+ deRegisterSubCluster(SubClusterId.newInstance("SC-2"));
Review Comment:
In unit test, what is the purpose of deRegisterS SC-2 offline to verify?
> Yarn app kill command can not kill the application in secondary sub cluster.
> ----------------------------------------------------------------------------
>
> Key: YARN-11566
> URL: https://issues.apache.org/jira/browse/YARN-11566
> Project: Hadoop YARN
> Issue Type: Improvement
> Reporter: zhengchenyu
> Assignee: zhengchenyu
> Priority: Major
> Labels: pull-request-available
>
> When AMRMProxy is enable, the application may allocate container among multi
> sub cluster. The application in secondary sub cluster will be labeled as
> unmananged application. When we run 'yarn app -kill \{appid}', the unmananged
> application will not be killed in secondary sub cluster.
> The unmanaged application will be removed util app attempt is expired after
> 15 minute.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]