YARN-5754. Null check missing for earliest in FifoPolicy. (Yufei Gu via kasha)

(cherry picked from commit a71fc81655)
This commit is contained in:
Karthik Kambatla 2016-10-24 22:19:14 -07:00
parent 5c2f67bdae
commit ab9105d814
1 changed files with 4 additions and 1 deletions

View File

@ -96,8 +96,11 @@ public class FifoPolicy extends SchedulingPolicy {
earliest = schedulable; earliest = schedulable;
} }
} }
if (earliest != null) {
earliest.setFairShare(Resources.clone(totalResources)); earliest.setFairShare(Resources.clone(totalResources));
} }
}
@Override @Override
public void computeSteadyShares(Collection<? extends FSQueue> queues, public void computeSteadyShares(Collection<? extends FSQueue> queues,