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 void updateNodeResource(RMNode nm,
|
|||||||
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…
Reference in New Issue
Block a user