Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,11 @@ public CSAssignment assignContainers(Resource clusterResource,
assignmentIterator.hasNext();) {
FiCaSchedulerApp application = assignmentIterator.next();

// Skip processing if the application is already removed from the applicationAttemptMap
if (!applicationAttemptMap.containsKey(application.getApplicationAttemptId())) {
continue;
}

ActivitiesLogger.APP.startAppAllocationRecording(activitiesManager,
node, SystemClock.getInstance().getTime(), application);

Expand Down Expand Up @@ -1264,7 +1269,10 @@ public CSAssignment assignContainers(Resource clusterResource,
userAssignable = canAssignToUser(clusterResource, application.getUser(),
userLimit, application, candidates.getPartition(),
currentResourceLimits);
if (!userAssignable && Resources.fitsIn(cul.reservation, appReserved)) {
if (!userAssignable
&& Resources.fitsIn(cul.reservation, appReserved)
// Consider updating cul only if the application attempt is active.
&& applicationAttemptMap.containsKey(application.getApplicationAttemptId())) {
cul.canAssign = false;
cul.reservation = appReserved;
}
Expand Down