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

This commit is contained in:
Karthik Kambatla 2017-02-23 15:21:52 -08:00
parent 159d6c56e7
commit 694e680d20
2 changed files with 2 additions and 2 deletions

View File

@ -407,8 +407,7 @@ private TreeSet<FSAppAttempt> fetchAppsWithDemand(boolean assignment) {
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

@ -5079,6 +5079,7 @@ public void testReservationMetrics() throws IOException {
scheduler.handle(updateEvent);
createSchedulingRequestExistingApplication(1024, 1, 1, appAttemptId);
scheduler.update();
scheduler.handle(updateEvent);
// no reservation yet