YARN-11560. Fix NPE bug when multi-node enabled with schedule asynchronously (#6021). Contributed by wangzhongwei.

This commit is contained in:
gavin.wang 2024-09-23 15:39:15 +08:00 committed by GitHub
parent ae63d8edd5
commit f5345b881d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1737,6 +1737,10 @@ private CSAssignment allocateContainerOnSingleNode(
private void allocateFromReservedContainer(FiCaSchedulerNode node,
boolean withNodeHeartbeat, RMContainer reservedContainer) {
if(reservedContainer == null){
LOG.warn("reservedContainer is null, that may be unreserved by the proposal judgment thread");
return;
}
FiCaSchedulerApp reservedApplication = getCurrentAttemptForContainer(
reservedContainer.getContainerId());
if (reservedApplication == null) {