Skip to content

Commit 1a75c82

Browse files
wolfboysbenjobs
andauthored
[Imporve] changeStateEvnet equals improvements (#3603)
* [Imporve] changeStateEvnet equals improvements * [Improve] trigger savepoint FE pop-window improvements --------- Co-authored-by: benjobs <[email protected]>
1 parent a4f64c2 commit 1a75c82

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,17 @@ public String getSavePointPath(Application appParam) throws Exception {
265265
if (!config.isEmpty()) {
266266
savepointPath = config.get(CheckpointingOptions.SAVEPOINT_DIRECTORY.key());
267267
}
268-
} else {
269-
// 3.2) At the yarn or k8s mode, then read the savepoint in flink-conf.yml in the bound
270-
// flink
271-
FlinkEnv flinkEnv = flinkEnvService.getById(application.getVersionId());
272-
savepointPath =
273-
flinkEnv.convertFlinkYamlAsMap().get(CheckpointingOptions.SAVEPOINT_DIRECTORY.key());
274268
}
275269
}
276270

271+
// 3.2) read the savepoint in flink-conf.yml in the bound
272+
if (StringUtils.isBlank(savepointPath)) {
273+
// flink
274+
FlinkEnv flinkEnv = flinkEnvService.getById(application.getVersionId());
275+
savepointPath =
276+
flinkEnv.convertFlinkYamlAsMap().get(CheckpointingOptions.SAVEPOINT_DIRECTORY.key());
277+
}
278+
277279
return savepointPath;
278280
}
279281

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -845,12 +845,10 @@ public boolean equals(Object object) {
845845
return false;
846846
}
847847
StateChangeEvent that = (StateChangeEvent) object;
848-
if (optionState != that.optionState) {
849-
return false;
850-
}
851848
return Objects.equals(id, that.id)
852849
&& Objects.equals(jobId, that.jobId)
853-
&& appState == that.appState
850+
&& Objects.equals(appState, that.appState)
851+
&& Objects.equals(optionState, that.optionState)
854852
&& Objects.equals(jobManagerUrl, that.jobManagerUrl);
855853
}
856854

streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useSavepoint.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export const useSavepoint = (updateOption: Fn) => {
106106
const { data } = await fetchCheckSavepointPath({ id: appId.value });
107107
if (data.data) {
108108
await handleSavepointAction(savepointReq);
109+
resolve(true);
109110
} else {
110111
await createErrorSwal(data.message);
111112
}

0 commit comments

Comments
 (0)