YARN-10295. CapacityScheduler NPE can cause apps to get stuck without resources. Contributed by Benjamin Teke
This commit is contained in:
parent
8bef26a607
commit
30d7a06686
@ -1599,11 +1599,14 @@ private CSAssignment allocateContainerOnSingleNode(
|
||||
}
|
||||
|
||||
// Do not schedule if there are any reservations to fulfill on the node
|
||||
if (node.getReservedContainer() != null) {
|
||||
// node.getReservedContainer() is saved to the reservedContainer variable
|
||||
// to ensure that a NPE described in YARN-10295 won't occur
|
||||
reservedContainer = node.getReservedContainer();
|
||||
if (reservedContainer != null) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Skipping scheduling since node " + node.getNodeID()
|
||||
+ " is reserved by application " + node.getReservedContainer()
|
||||
.getContainerId().getApplicationAttemptId());
|
||||
+ " is reserved by application " + reservedContainer
|
||||
.getContainerId().getApplicationAttemptId());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user