Skip to content

Commit

Permalink
[Imporve] changeStateEvnet equals improvements (#3603)
Browse files Browse the repository at this point in the history
* [Imporve] changeStateEvnet equals improvements

* [Improve] trigger savepoint FE pop-window improvements

---------

Co-authored-by: benjobs <[email protected]>
  • Loading branch information
wolfboys and benjobs authored Mar 7, 2024
1 parent a4f64c2 commit 1a75c82
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,17 @@ public String getSavePointPath(Application appParam) throws Exception {
if (!config.isEmpty()) {
savepointPath = config.get(CheckpointingOptions.SAVEPOINT_DIRECTORY.key());
}
} else {
// 3.2) At the yarn or k8s mode, then read the savepoint in flink-conf.yml in the bound
// flink
FlinkEnv flinkEnv = flinkEnvService.getById(application.getVersionId());
savepointPath =
flinkEnv.convertFlinkYamlAsMap().get(CheckpointingOptions.SAVEPOINT_DIRECTORY.key());
}
}

// 3.2) read the savepoint in flink-conf.yml in the bound
if (StringUtils.isBlank(savepointPath)) {
// flink
FlinkEnv flinkEnv = flinkEnvService.getById(application.getVersionId());
savepointPath =
flinkEnv.convertFlinkYamlAsMap().get(CheckpointingOptions.SAVEPOINT_DIRECTORY.key());
}

return savepointPath;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -845,12 +845,10 @@ public boolean equals(Object object) {
return false;
}
StateChangeEvent that = (StateChangeEvent) object;
if (optionState != that.optionState) {
return false;
}
return Objects.equals(id, that.id)
&& Objects.equals(jobId, that.jobId)
&& appState == that.appState
&& Objects.equals(appState, that.appState)
&& Objects.equals(optionState, that.optionState)
&& Objects.equals(jobManagerUrl, that.jobManagerUrl);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const useSavepoint = (updateOption: Fn) => {
const { data } = await fetchCheckSavepointPath({ id: appId.value });
if (data.data) {
await handleSavepointAction(savepointReq);
resolve(true);
} else {
await createErrorSwal(data.message);
}
Expand Down

0 comments on commit 1a75c82

Please sign in to comment.