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

Potential NPE when calling SchedulerNode#reservedContainer for CapacityScheduler

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      I found some places calling SchedulerNode#getReservedContainer to get reservedContainer (returned value) but not do sanity(not-null) check before calling internal methods of it, which can have a risk to raise NullPointerException if it's null.

      Most of these places have a premise that node has reserved container a few moments ago, but may getting null by calling SchedulerNode#getReservedContainer in the next moment, since the reservedContainer can be updated to null concurrently in scheduling and monitoring(preemption) thread. So that not-null check should be done before calling internal methods of the reservedContainer.

       

      Attachments

        Issue Links

          Activity

            People

              Tao Yang Tao Yang
              Tao Yang Tao Yang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: