[ https://issues.apache.org/jira/browse/YARN-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16268065#comment-16268065 ]
Haibo Chen commented on YARN-7491: ---------------------------------- That's because of this {code} @@ -491,7 +491,7 @@ private RMAppImpl createAndPopulateNewRMApp( for (ResourceRequest amReq : amReqs) { amReq.setCapability(anyReq.getCapability()); amReq.setExecutionTypeRequest( - ExecutionTypeRequest.newInstance(ExecutionType.GUARANTEED)); + ExecutionTypeRequest.newInstance(ExecutionType.GUARANTEED, true)); amReq.setNumContainers(1); amReq.setPriority(RMAppAttemptImpl.AM_CONTAINER_PRIORITY); } {code} which is the core of this patch. All AM resource requests, whether specified in submission context or not, will be normalized as above. If you revert that core change, TestAppManager will fail. Though not absolutely necessary, {code} if (amReqs == null || amReqs.isEmpty()) { if (submissionContext.getResource() != null) { amReqs = Collections.singletonList(BuilderUtils - .newResourceRequest(RMAppAttemptImpl.AM_CONTAINER_PRIORITY, - ResourceRequest.ANY, submissionContext.getResource(), 1)); + .newAMResourceRequest(RMAppAttemptImpl.AM_CONTAINER_PRIORITY, + ResourceRequest.ANY, submissionContext.getResource())); {code} makes it very clear that we always set the enforceExecutionType to true for AM resource requests. > Make sure AM is not scheduled on an opportunistic container > ----------------------------------------------------------- > > Key: YARN-7491 > URL: https://issues.apache.org/jira/browse/YARN-7491 > Project: Hadoop YARN > Issue Type: Sub-task > Components: scheduler > Reporter: Haibo Chen > Assignee: Haibo Chen > Attachments: YARN-7491-YARN-1011.00.patch > > -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org