YARN-6222. TestFairScheduler.testReservationMetrics is flaky. (Yufei Gu via kasha)
(cherry picked from commit 694e680d20
)
This commit is contained in:
parent
9b947611a7
commit
40bc9e7ddb
|
@ -407,8 +407,7 @@ public class FSLeafQueue extends FSQueue {
|
||||||
readLock.lock();
|
readLock.lock();
|
||||||
try {
|
try {
|
||||||
for (FSAppAttempt app : runnableApps) {
|
for (FSAppAttempt app : runnableApps) {
|
||||||
Resource pending = app.getAppAttemptResourceUsage().getPending();
|
if (!Resources.isNone(app.getPendingDemand()) &&
|
||||||
if (!Resources.isNone(pending) &&
|
|
||||||
(assignment || app.shouldCheckForStarvation())) {
|
(assignment || app.shouldCheckForStarvation())) {
|
||||||
pendingForResourceApps.add(app);
|
pendingForResourceApps.add(app);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5071,6 +5071,7 @@ public class TestFairScheduler extends FairSchedulerTestBase {
|
||||||
scheduler.handle(updateEvent);
|
scheduler.handle(updateEvent);
|
||||||
|
|
||||||
createSchedulingRequestExistingApplication(1024, 1, 1, appAttemptId);
|
createSchedulingRequestExistingApplication(1024, 1, 1, appAttemptId);
|
||||||
|
scheduler.update();
|
||||||
scheduler.handle(updateEvent);
|
scheduler.handle(updateEvent);
|
||||||
|
|
||||||
// no reservation yet
|
// no reservation yet
|
||||||
|
|
Loading…
Reference in New Issue