Skip to content

Commit fecba85

Browse files
authored
[hotfix][console-service] Fixed finished job is no need alert. (#4293)
1 parent 252bd20 commit fecba85

File tree

1 file changed

+18
-1
lines changed
  • streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/watcher

1 file changed

+18
-1
lines changed

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/watcher/FlinkAppHttpWatcher.java

100644100755
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ private void handleNotRunState(
485485
doPersistMetrics(application, false);
486486
break;
487487
case CANCELED:
488-
case FINISHED:
489488
log.info(
490489
"[StreamPark][FlinkAppHttpWatcher] getFromFlinkRestApi, job state {}, stop tracking and delete stopFrom!",
491490
currentState.name());
@@ -504,6 +503,24 @@ private void handleNotRunState(
504503
doPersistMetrics(application, true);
505504
cleanOptioning(optionState, application.getId());
506505
break;
506+
case FINISHED:
507+
log.info(
508+
"[StreamPark][FlinkAppHttpWatcher] getFromFlinkRestApi, job state {}, stop tracking and delete stopFrom!",
509+
currentState.name());
510+
cleanSavepoint(application);
511+
application.setState(currentState.getValue());
512+
if (StopFromEnum.NONE.equals(stopFrom) || applicationInfoService.checkAlter(application)) {
513+
if (StopFromEnum.NONE.equals(stopFrom)) {
514+
log.info(
515+
"[StreamPark][FlinkAppHttpWatcher] getFromFlinkRestApi, job finished is not form StreamPark,savepoint expired!");
516+
savepointService.expire(application.getId());
517+
}
518+
stopCanceledJob(application.getId());
519+
}
520+
STOP_FROM_MAP.remove(application.getId());
521+
doPersistMetrics(application, true);
522+
cleanOptioning(optionState, application.getId());
523+
break;
507524
case FAILED:
508525
cleanSavepoint(application);
509526
STOP_FROM_MAP.remove(application.getId());

0 commit comments

Comments
 (0)