Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-10459

containerLaunchedOnNode method not need to hold schedulerApptemt lock

    XMLWordPrintableJSON

Details

    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.

       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(); 
         } 
      }  
      

       

      Attachments

        1. YARN-10459.v1.patch
          2 kB
          Minni Mittal

        Issue Links

          Activity

            People

              minni31 Minni Mittal
              jianliang.wu Ryan Wu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m