Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liunaijie committed Nov 26, 2024
1 parent 9bc738e commit 873d44c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ public PassiveCompletableFuture<Void> submitJob(
() -> {
try {
if (!isStartWithSavePoint
&& getJobHistoryService().getJobMetrics(jobId) != null) {
&& getJobHistoryService().getJobMetrics(jobId)
!= JobMetrics.empty()) {
throw new JobException(
String.format(
"The job id %s has already been submitted and is not starting with a savepoint.",
Expand Down Expand Up @@ -771,7 +772,7 @@ public JobMetrics getJobMetrics(long jobId) {
}
JobMetrics jobMetrics = JobMetricsUtil.toJobMetrics(runningJobMaster.getCurrJobMetrics());
JobMetrics jobMetricsImap = jobHistoryService.getJobMetrics(jobId);
return jobMetricsImap != null ? jobMetricsImap.merge(jobMetrics) : jobMetrics;
return jobMetricsImap != JobMetrics.empty() ? jobMetricsImap.merge(jobMetrics) : jobMetrics;
}

public Map<Long, JobMetrics> getRunningJobMetrics() {
Expand Down Expand Up @@ -823,7 +824,7 @@ public Map<Long, JobMetrics> getRunningJobMetrics() {
longJobMetricsMap.forEach(
(jobId, jobMetrics) -> {
JobMetrics jobMetricsImap = jobHistoryService.getJobMetrics(jobId);
if (jobMetricsImap != null) {
if (jobMetricsImap != JobMetrics.empty()) {
longJobMetricsMap.put(jobId, jobMetricsImap.merge(jobMetrics));
}
});
Expand Down

0 comments on commit 873d44c

Please sign in to comment.