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

FifoPolicy.computeShares throws NPE on empty list of Schedulables

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-beta
    • Fix Version/s: 2.2.0
    • Component/s: scheduler
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      FifoPolicy gives all of a queue's share to the earliest-scheduled application.

          Schedulable earliest = null;
          for (Schedulable schedulable : schedulables) {
            if (earliest == null ||
                schedulable.getStartTime() < earliest.getStartTime()) {
              earliest = schedulable;
            }
          }
          earliest.setFairShare(Resources.clone(totalResources));
      

      If the queue has no schedulables in it, earliest will be left null, leading to an NPE on the last line.

        Attachments

        1. yarn-1128-1.patch
          4 kB
          Karthik Kambatla

          Activity

            People

            • Assignee:
              kasha Karthik Kambatla
              Reporter:
              sandyr Sandy Ryza
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: