[ 
https://issues.apache.org/jira/browse/YARN-10459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Wu updated YARN-10459:
---------------------------
    Description: 
 

Now, the containerLaunchedOnNode method hold the SchedulerApplicationAttempt 
writelock, but looking at the method, it does not change any field. And more 
seriously, this will affect the scheduler.
{code:java}
// public void containerLaunchedOnNode(ContainerId containerId, NodeId nodeId) 
{ 
    // Inform the container 
    writelock.lock 
    try { 
      RMContainer rmContainer = getRMContainer(containerId); 
      if (rmContainer == null) { 
      // Some unknown container sneaked into the system. Kill it.          
        rmContext.getDispatcher().getEventHandler().handle( new 
RMNodeCleanContainerEvent(nodeId, containerId)); return; 
      } 
      rmContainer.handle( new RMContainerEvent(containerId, 
RMContainerEventType.LAUNCHED)); 
   }finally { 
      writeLock.unlock(); 
   } 
}  
{code}
 

  was:
 

Now, the containerLaunchedOnNode method hold the SchedulerApplicationAttempt 
writelock, but looking at the method, it does not change any field. And more 
seriously, this will affect the scheduler.
{code:java}
// code placeholder
{code}
public void containerLaunchedOnNode(ContainerId containerId, NodeId nodeId) \{ 
// Inform the container writelock.lock try { RMContainer rmContainer = 
getRMContainer(containerId); if (rmContainer == null) { // Some unknown 
container sneaked into the system. Kill it. 
rmContext.getDispatcher().getEventHandler().handle( new 
RMNodeCleanContainerEvent(nodeId, containerId)); return; } rmContainer.handle( 
new RMContainerEvent(containerId, RMContainerEventType.LAUNCHED)); }finally \{ 
writeLock.unlock(); } }  


> containerLaunchedOnNode method not need to hold schedulerApptemt lock 
> ----------------------------------------------------------------------
>
>                 Key: YARN-10459
>                 URL: https://issues.apache.org/jira/browse/YARN-10459
>             Project: Hadoop YARN
>          Issue Type: Improvement
>    Affects Versions: 3.2.0, 3.1.3
>            Reporter: Ryan Wu
>            Priority: Major
>             Fix For: 3.2.1
>
>
>  
> Now, the containerLaunchedOnNode method hold the SchedulerApplicationAttempt 
> writelock, but looking at the method, it does not change any field. And more 
> seriously, this will affect the scheduler.
> {code:java}
> // public void containerLaunchedOnNode(ContainerId containerId, NodeId 
> nodeId) { 
>     // Inform the container 
>     writelock.lock 
>     try { 
>       RMContainer rmContainer = getRMContainer(containerId); 
>       if (rmContainer == null) { 
>       // Some unknown container sneaked into the system. Kill it.          
>         rmContext.getDispatcher().getEventHandler().handle( new 
> RMNodeCleanContainerEvent(nodeId, containerId)); return; 
>       } 
>       rmContainer.handle( new RMContainerEvent(containerId, 
> RMContainerEventType.LAUNCHED)); 
>    }finally { 
>       writeLock.unlock(); 
>    } 
> }  
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to