Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ private void handleNotRunState(
doPersistMetrics(application, false);
break;
case CANCELED:
case FINISHED:
log.info(
"[StreamPark][FlinkAppHttpWatcher] getFromFlinkRestApi, job state {}, stop tracking and delete stopFrom!",
currentState.name());
Expand All @@ -504,6 +503,26 @@ private void handleNotRunState(
doPersistMetrics(application, true);
cleanOptioning(optionState, application.getId());
break;
case FINISHED:
log.info(
"[StreamPark][FlinkAppHttpWatcher] getFromFlinkRestApi, job state {}, stop tracking and delete stopFrom!",
currentState.name());
cleanSavepoint(application);
application.setState(currentState.getValue());
if (StopFromEnum.NONE.equals(stopFrom) || applicationInfoService.checkAlter(application)) {
if (StopFromEnum.NONE.equals(stopFrom)) {
log.info(
"[StreamPark][FlinkAppHttpWatcher] getFromFlinkRestApi, job finished is not form StreamPark,savepoint expired!");
savepointService.expire(application.getId());
}
stopCanceledJob(application.getId());
// 不发送报警,因为FINISHED对于批作业是正常状态
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment i18n minor issues need to be fixed.

// doAlert(application, FlinkAppStateEnum.CANCELED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • What about dropping the commented line if we not need it ?
  • For the current patch, We'd better to follow [1] to create an issue for tracking the change of the current PR.
  • ditto to the title of the PR and commit message.

[1] https://streampark.apache.org/community/submit_guide/code_style_and_quality_guide#1-pull-requests--changes-rule

}
STOP_FROM_MAP.remove(application.getId());
doPersistMetrics(application, true);
cleanOptioning(optionState, application.getId());
break;
case FAILED:
cleanSavepoint(application);
STOP_FROM_MAP.remove(application.getId());
Expand Down