YARN-10651. CapacityScheduler crashed with NPE in AbstractYarnScheduler.updateNodeResource(). Contributed by Haibo Chen
(cherry picked from commit f348ab3f2f468751af329a1ffce4917cb000fcbf) (cherry picked from commitbe6e99963d
) (cherry picked from commit6863a5bb8a
) (cherry picked from commiteb6c08e423
)
This commit is contained in:
parent
4ed7b80b19
commit
1d76a8e73f
|
@ -805,6 +805,11 @@ public abstract class AbstractYarnScheduler
|
|||
try {
|
||||
writeLock.lock();
|
||||
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 oldResource = node.getTotalResource();
|
||||
if (!oldResource.equals(newResource)) {
|
||||
|
|
Loading…
Reference in New Issue