Skip to content

Commit

Permalink
[Fix][JobHistoryService]: Fix loss job (apache#6759)
Browse files Browse the repository at this point in the history
  • Loading branch information
useheart committed May 6, 2024
1 parent a5609d6 commit 731913a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ public JobHistoryService(
// Gets the status of a running and completed job
public String listAllJob() {
List<JobStatusData> status = new ArrayList<>();
Set<Long> runningJonIds =
runningJobMasterMap.values().stream()
.map(master -> master.getJobImmutableInformation().getJobId())
.collect(Collectors.toSet());
Stream.concat(
runningJobMasterMap.values().stream()
.map(master -> toJobStateMapper(master, true)),
final List<JobState> runningJobStateList = runningJobMasterMap.values().stream()
.map(master -> toJobStateMapper(master, true))
.collect(Collectors.toList());
Set<Long> runningJonIds = runningJobStateList.stream()
.map(JobState::getJobId)
.collect(Collectors.toSet());
Stream.concat(runningJobStateList.stream(),
finishedJobStateImap.values().stream()
.filter(jobState -> !runningJonIds.contains(jobState.getJobId())))
.forEach(
Expand Down

0 comments on commit 731913a

Please sign in to comment.