YARN-6222. TestFairScheduler.testReservationMetrics is flaky. (Yufei Gu via kasha)
This commit is contained in:
parent
159d6c56e7
commit
694e680d20
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user