fix #393

parent 0781bc44
...@@ -463,7 +463,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen ...@@ -463,7 +463,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
return jobManager.cancel(jobId); return jobManager.cancel(jobId);
} }
SavePointResult savePointResult = jobManager.savepoint(jobId, savePointType, null); SavePointResult savePointResult = jobManager.savepoint(jobId, savePointType, null);
if (Asserts.isNotNull(savePointResult)) { if (Asserts.isNotNull(savePointResult.getJobInfos())) {
for (JobInfo item : savePointResult.getJobInfos()) { for (JobInfo item : savePointResult.getJobInfos()) {
if (Asserts.isEqualsIgnoreCase(jobId, item.getJobId()) && Asserts.isNotNull(jobConfig.getTaskId())) { if (Asserts.isEqualsIgnoreCase(jobId, item.getJobId()) && Asserts.isNotNull(jobConfig.getTaskId())) {
Savepoints savepoints = new Savepoints(); Savepoints savepoints = new Savepoints();
......
...@@ -98,6 +98,7 @@ public class FlinkAPI { ...@@ -98,6 +98,7 @@ public class FlinkAPI {
switch (type) { switch (type) {
case CANCEL: case CANCEL:
jobInfo.setStatus(JobInfo.JobStatus.CANCEL); jobInfo.setStatus(JobInfo.JobStatus.CANCEL);
break;
case STOP: case STOP:
paramMap.put("drain", false); paramMap.put("drain", false);
paramType = FlinkRestAPIConstant.STOP; paramType = FlinkRestAPIConstant.STOP;
...@@ -127,7 +128,7 @@ public class FlinkAPI { ...@@ -127,7 +128,7 @@ public class FlinkAPI {
continue; continue;
} }
if (node.get("operation").has("failure-cause")) { if (node.get("operation").has("failure-cause")) {
String failureCause = node.get("operation").get("failure-cause").asText(); String failureCause = node.get("operation").get("failure-cause").toString();
if (Asserts.isNotNullString(failureCause)) { if (Asserts.isNotNullString(failureCause)) {
result.fail(failureCause); result.fail(failureCause);
break; break;
......
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