[ https://issues.apache.org/jira/browse/YARN-4143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14805098#comment-14805098 ]
Sunil G commented on YARN-4143: ------------------------------- Sorry, for point 1, I meant adding below snippet. {code} // The working knowledge is that masterContainer for AM is null as it // itself is the master container. RMAppAttempt appAttempt = rmContext.getRMApps().get(applicationId).getCurrentAppAttempt(); return (appAttempt != null && appAttempt.getMasterContainer() == null && appAttempt.getSubmissionContext().getUnmanagedAM() == false); {code} > Optimize the check for AMContainer allocation needed by blacklisting and > ContainerType > -------------------------------------------------------------------------------------- > > Key: YARN-4143 > URL: https://issues.apache.org/jira/browse/YARN-4143 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Anubhav Dhoot > Assignee: Anubhav Dhoot > Attachments: YARN-4143.001.patch > > > In YARN-2005 there are checks made to determine if the allocation is for an > AM container. This happens in every allocate call and should be optimized > away since it changes only once per SchedulerApplicationAttempt -- This message was sent by Atlassian JIRA (v6.3.4#6332)