YARN-10651. CapacityScheduler crashed with NPE in AbstractYarnScheduler.updateNodeResource(). Contributed by Haibo Chen
This commit is contained in:
parent
c373da9f88
commit
ac37ca0b67
@ -848,6 +848,11 @@ public abstract class AbstractYarnScheduler
|
|||||||
writeLock.lock();
|
writeLock.lock();
|
||||||
try {
|
try {
|
||||||
SchedulerNode node = getSchedulerNode(nm.getNodeID());
|
SchedulerNode node = getSchedulerNode(nm.getNodeID());
|
||||||
|
if (node == null) {
|
||||||
|
LOG.info("Node: " + nm.getNodeID() + " has already been taken out of " +
|
||||||
|
"scheduling. Skip updating its resource");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Resource newResource = resourceOption.getResource();
|
Resource newResource = resourceOption.getResource();
|
||||||
final int timeout = resourceOption.getOverCommitTimeout();
|
final int timeout = resourceOption.getOverCommitTimeout();
|
||||||
Resource oldResource = node.getTotalResource();
|
Resource oldResource = node.getTotalResource();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user