YARN-8164. Fix a potential NPE in AbstractSchedulerPlanFollower. Contributed by lujie.
(cherry picked from commit f1461b2487d6c7a0b87e3799a8fdb5ade40ad898)
This commit is contained in:
parent
f37f680a4e
commit
93fc813329
@ -263,7 +263,10 @@ protected void cleanupExpiredQueues(String planQueueName, boolean shouldMove,
|
|||||||
if (shouldMove) {
|
if (shouldMove) {
|
||||||
moveAppsInQueueSync(expiredReservation, defReservationQueue);
|
moveAppsInQueueSync(expiredReservation, defReservationQueue);
|
||||||
}
|
}
|
||||||
if (scheduler.getAppsInQueue(expiredReservation).size() > 0) {
|
List<ApplicationAttemptId> appsInQueue = scheduler.
|
||||||
|
getAppsInQueue(expiredReservation);
|
||||||
|
int size = (appsInQueue == null ? 0 : appsInQueue.size());
|
||||||
|
if (size > 0) {
|
||||||
scheduler.killAllAppsInQueue(expiredReservation);
|
scheduler.killAllAppsInQueue(expiredReservation);
|
||||||
LOG.info("Killing applications in queue: {}", expiredReservation);
|
LOG.info("Killing applications in queue: {}", expiredReservation);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user