This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new d98080b1a [bug] Fix yarn per-job and yarn application cancellation
failure due to inconsistent ClusterId. (#2070)
d98080b1a is described below
commit d98080b1a4d7dd51092c5e3ca87ce6d696000e8e
Author: monster <[email protected]>
AuthorDate: Sun Nov 20 00:15:57 2022 +0800
[bug] Fix yarn per-job and yarn application cancellation failure due to
inconsistent ClusterId. (#2070)
---
.../console/core/service/impl/ApplicationServiceImpl.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
index 1c58a46f0..5d58aaeac 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
@@ -1086,11 +1086,16 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
if (!application.getUserId().equals(userId)) {
FlinkTrackingTask.addCanceledApp(application.getId(), userId);
}
-
+ String clusterId = null;
+ if (ExecutionMode.isKubernetesMode(application.getExecutionMode())) {
+ clusterId = application.getClusterId();
+ } else if (ExecutionMode.isYarnMode(application.getExecutionMode())) {
+ clusterId = application.getAppId();
+ }
CancelRequest cancelRequest = new CancelRequest(
flinkEnv.getFlinkVersion(),
ExecutionMode.of(application.getExecutionMode()),
- application.getClusterId(),
+ clusterId,
application.getJobId(),
appParam.getSavePointed(),
appParam.getDrain(),