Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix]Fix offline task NPE #3203

Merged
merged 10 commits into from
Feb 29, 2024
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
Loading