[ https://issues.apache.org/jira/browse/YARN-2997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14263389#comment-14263389 ]
Chengbing Liu commented on YARN-2997: ------------------------------------- {quote} for simplicity, we can use the addAll method for the for loop. {quote} Yes, I will change this. {quote} pendingCompletedContainers, maybe use a set instead of a map? {quote} I'm not sure if {{ContainerStatus}} can be compared, because I didn't see an {{equals}} method defined in the abstract class {{ContainerStatus}}. {quote} pendingCompletedContainers.remove(containerId); this line may be not needed {quote} I added this line in method {{removeOrTrackCompletedContainersFromContext}} after I discovered the method is called independently in the test {{testRemovePreviousCompletedContainersFromContext}}. The test first calls {{removeOrTrackCompletedContainersFromContext}} then {{getContainerStatuses}}, and expects the container status to be removed from the result. So I guess we have to keep it? {quote} I found pendingContainersToRemove potentially has a leak, {quote} Yes you are right, I will fix this and add comments for modified test cases. > NM keeps sending finished containers to RM until app is finished > ---------------------------------------------------------------- > > Key: YARN-2997 > URL: https://issues.apache.org/jira/browse/YARN-2997 > Project: Hadoop YARN > Issue Type: Bug > Components: nodemanager > Affects Versions: 2.6.0 > Reporter: Chengbing Liu > Attachments: YARN-2997.2.patch, YARN-2997.patch > > > We have seen in RM log a lot of > {quote} > INFO > org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler: > Null container completed... > {quote} > It is caused by NM sending completed containers repeatedly until the app is > finished. On the RM side, the container is already released, hence > {{getRMContainer}} returns null. -- This message was sent by Atlassian JIRA (v6.3.4#6332)