Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fdc-ntflx committed Oct 26, 2023
1 parent ea6ee67 commit dbf0ed9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,19 @@ public Optional<Entry<TaskExecutorID, TaskExecutorState>> findFirst(

@Override
public void markJobAsStartedRequest(String jobId) {
log.info("[fdc-111] markJobAsStartedRequest {}", jobId);
taskExecutorStateMap
.values()
.stream()
.filter(s -> s.getRegistration() != null && s.getWorkerId() != null && s.getWorkerId().getJobId().equals(jobId))
.forEach(s -> {
MachineDefinition m = s.getRegistration().getMachineDefinition();
if (unavailabilityByMachineDef.containsKey(m.getCpuCores())) {
log.info("[fdc-111] markJobAsStartedRequest {} - totMissing: {}", jobId, unavailabilityByMachineDef.get(m.getCpuCores()) - 1);
unavailabilityByMachineDef.put(m.getCpuCores(), unavailabilityByMachineDef.get(m.getCpuCores()) - 1);
}
});
jobIds.remove(jobId);
}

@Override
Expand Down

0 comments on commit dbf0ed9

Please sign in to comment.