You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Karthik Kambatla (JIRA)" <ji...@apache.org> on 2016/06/14 20:36:30 UTC

[jira] [Commented] (YARN-5241) FairScheduler fails to release container it is just allocated

    [ https://issues.apache.org/jira/browse/YARN-5241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15330540#comment-15330540 ] 

Karthik Kambatla commented on YARN-5241:
----------------------------------------

Thanks for updating the patch, [~chenfolin]. I understand the issue now and the approach in the patch seems reasonable. 

For improved readability, can we do the following:
# Set needRelease if it either newlyAllocatedContainers or liveContainers has it. 
# Also, would be nice to remove from both collections at the same time. The code would likely look like:
{code}
    boolean needRelease = newlyAllocatedContainers.contains(rmContainer) 
        || liveContainers.containsKey(rmContainer.getContainerId());
    newlyAllocatedContainers.remove(rmContainer);
    liveContainers.remove(rmContainer.getContainerId());
{code}
# The indentation of the if check for whether debug logging is enabled is not proper. Mind updating that? 

> FairScheduler fails to release container it is just allocated
> -------------------------------------------------------------
>
>                 Key: YARN-5241
>                 URL: https://issues.apache.org/jira/browse/YARN-5241
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>    Affects Versions: 2.5.0, 2.6.1, 2.8.0, 2.7.2
>            Reporter: ChenFolin
>         Attachments: YARN-5241-001.patch, YARN-5241-002.patch, repeatContainerCompleted.log
>
>
> NodeManager heartbeat event NODE_UPDATE and ApplicationMaster allocate operate may cause repeat container completed, it can lead something wrong.
> Node releaseContainer can pervent repeat release operate:
> like:
> public synchronized void releaseContainer(Container container) {
>     if (!isValidContainer(container.getId())) {
>       LOG.error("Invalid container released " + container);
>       return;
>     }
> FSAppAttempt containerCompleted did not prevent repeat container completed operate.
> Detail logs at attach file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org