YARN-10651. CapacityScheduler crashed with NPE in AbstractYarnScheduler.updateNodeResource(). Contributed by Haibo Chen
(cherry picked from commit f348ab3f2f468751af329a1ffce4917cb000fcbf)
This commit is contained in:
parent
db457b056a
commit
be6e99963d
|
@ -842,6 +842,11 @@ public abstract class AbstractYarnScheduler
|
|||
writeLock.lock();
|
||||
try {
|
||||
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();
|
||||
final int timeout = resourceOption.getOverCommitTimeout();
|
||||
Resource oldResource = node.getTotalResource();
|
||||
|
|
Loading…
Reference in New Issue