Skip to content

Commit

Permalink
[HotFix][zeta]: Fix loss job (#6759) (#6807)
Browse files Browse the repository at this point in the history
  • Loading branch information
drgonroot committed May 9, 2024
1 parent 4660096 commit a34d259
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,17 @@ public JobHistoryService(
this.finishedJobExpireTime = finishedJobExpireTime;
}

// Gets the status of a running and completed job
// Gets the status of a running and completed job.
public String listAllJob() {
List<JobStatusData> status = new ArrayList<>();
Set<Long> runningJonIds =
final List<JobState> runningJobStateList =
runningJobMasterMap.values().stream()
.map(master -> master.getJobImmutableInformation().getJobId())
.collect(Collectors.toSet());
.map(master -> toJobStateMapper(master, true))
.collect(Collectors.toList());
Set<Long> runningJonIds =
runningJobStateList.stream().map(JobState::getJobId).collect(Collectors.toSet());
Stream.concat(
runningJobMasterMap.values().stream()
.map(master -> toJobStateMapper(master, true)),
runningJobStateList.stream(),
finishedJobStateImap.values().stream()
.filter(jobState -> !runningJonIds.contains(jobState.getJobId())))
.forEach(
Expand Down

0 comments on commit a34d259

Please sign in to comment.