Skip to content

Commit

Permalink
[Fix]Fix offline task NPE (#3203)
Browse files Browse the repository at this point in the history
Co-authored-by: gaoyan1998 <[email protected]>
  • Loading branch information
gaoyan1998 and gaoyan1998 authored Feb 29, 2024
1 parent 0c06a66 commit bbe6965
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import org.dinky.data.flink.exceptions.FlinkJobExceptionsDetail;
import org.dinky.data.model.ClusterInstance;
import org.dinky.data.model.SystemConfiguration;
import org.dinky.data.model.job.History;
import org.dinky.data.model.job.JobInstance;
import org.dinky.data.options.JobAlertRuleOptions;
import org.dinky.job.JobConfig;
import org.dinky.utils.TimeUtil;

import java.time.LocalDateTime;
Expand Down Expand Up @@ -156,7 +156,6 @@ public static JobAlertData buildData(JobInfoDetail jobInfoDetail) {
builder.alertTime(TimeUtil.nowStr());

JobDataDto jobDataDto = jobInfoDetail.getJobDataDto();
JobConfig job = jobInfoDetail.getHistory().getConfigJson();
ClusterInstance clusterInstance = jobInfoDetail.getClusterInstance();
CheckPointOverView checkpoints = jobDataDto.getCheckpoints();
FlinkJobExceptionsDetail exceptions = jobDataDto.getExceptions();
Expand All @@ -173,8 +172,9 @@ public static JobAlertData buildData(JobInfoDetail jobInfoDetail) {
.duration(Optional.ofNullable(jobInstance.getDuration()).orElse(0L))
.jobStartTime(getTime(jobInstance.getCreateTime()))
.jobEndTime(getTime(jobInstance.getFinishTime()));
if (job != null) {
builder.batchModel(job.isBatchModel());
History jobHis = jobInfoDetail.getHistory();
if (jobHis != null && jobHis.getConfigJson() != null) {
builder.batchModel(jobHis.getConfigJson().isBatchModel());
}

if (clusterInstance != null) {
Expand Down

0 comments on commit bbe6965

Please sign in to comment.