Unverified Commit 698a31e5 authored by MaoMiMao's avatar MaoMiMao Committed by GitHub

Fix [admin] get task checkpoint & checkpointConfigInfo parsed failed when task…

Fix [admin] get task checkpoint & checkpointConfigInfo parsed failed when task not configura checkpoint option (#2905) * 处理任务checkpoint 没有设置时,任务获取返回解析空指针异常,同时可能导致MDC获取不到 * 处理任务checkpoint 没有设置时,任务获取返回解析空指针异常,同时可能导致MDC获取不到
parent a2a142d8
......@@ -213,11 +213,16 @@ public class JobRefreshHandler {
}
});
});
JsonNode checkPoints = api.getCheckPoints(jobId);
if (checkPoints.findParent("errors") == null) {
builder.checkpoints(JsonUtils.parseObject(checkPoints.toString(), CheckPointOverView.class));
}
JsonNode checkpointConfigInfo = api.getCheckPointsConfig(jobId);
if (checkpointConfigInfo.findParent("errors") == null) {
builder.checkpointsConfig(
JsonUtils.parseObject(checkpointConfigInfo.toString(), CheckpointConfigInfo.class));
}
return builder.id(id)
.checkpoints(JsonUtils.parseObject(api.getCheckPoints(jobId).toString(), CheckPointOverView.class))
.checkpointsConfig(JsonUtils.parseObject(
api.getCheckPointsConfig(jobId).toString(), CheckpointConfigInfo.class))
.exceptions(
JsonUtils.parseObject(api.getException(jobId).toString(), FlinkJobExceptionsDetail.class))
.job(flinkJobDetailInfo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment