YARN-6222. TestFairScheduler.testReservationMetrics is flaky. (Yufei Gu via kasha)

(cherry picked from commit 694e680d20)
This commit is contained in:
Karthik Kambatla 2017-02-23 15:21:52 -08:00
parent 9b947611a7
commit 40bc9e7ddb
2 changed files with 2 additions and 2 deletions

View File

@ -407,8 +407,7 @@ public class FSLeafQueue extends FSQueue {
readLock.lock();
try {
for (FSAppAttempt app : runnableApps) {
Resource pending = app.getAppAttemptResourceUsage().getPending();
if (!Resources.isNone(pending) &&
if (!Resources.isNone(app.getPendingDemand()) &&
(assignment || app.shouldCheckForStarvation())) {
pendingForResourceApps.add(app);
}

View File

@ -5071,6 +5071,7 @@ public class TestFairScheduler extends FairSchedulerTestBase {
scheduler.handle(updateEvent);
createSchedulingRequestExistingApplication(1024, 1, 1, appAttemptId);
scheduler.update();
scheduler.handle(updateEvent);
// no reservation yet