This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev-2.1.5
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev-2.1.5 by this push:
     new 739866318 [Improve] app status bug fixed.
739866318 is described below

commit 7398663186b162673ee8c6120b292b24980b4aa5
Author: benjobs <[email protected]>
AuthorDate: Wed Aug 21 11:42:22 2024 +0800

    [Improve] app status bug fixed.
---
 .../console/core/service/impl/ApplicationServiceImpl.java    | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 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 11b973bc6..1e1d5ae8f 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
@@ -1399,9 +1399,13 @@ public class ApplicationServiceImpl extends 
ServiceImpl<ApplicationMapper, Appli
               if (appParam.getRestoreOrTriggerSavepoint()) {
                 savepointService.expire(application.getId());
               }
-              // re-tracking flink job on kubernetes and logging exception
               if (application.isKubernetesModeJob()) {
-                flinkK8sWatcher.unWatching(trackId);
+                try {
+                  KubernetesDeploymentHelper.delete(
+                      application.getK8sNamespace(), application.getJobName());
+                } catch (Exception e) {
+                  log.error("job abort failed!", e);
+                }
               } else {
                 FlinkAppHttpWatcher.unWatching(application.getId());
               }
@@ -1844,14 +1848,16 @@ public class ApplicationServiceImpl extends 
ServiceImpl<ApplicationMapper, Appli
     application.setOptionTime(new Date());
     updateById(application);
     savepointService.expire(application.getId());
-    // delete deployment
     if (application.isKubernetesModeJob()) {
       try {
         KubernetesDeploymentHelper.delete(application.getK8sNamespace(), 
application.getJobName());
       } catch (Exception e) {
         log.error("job abort failed!", e);
       }
+    } else {
+      FlinkAppHttpWatcher.unWatching(application.getId());
     }
+
     // kill application
     if (ExecutionMode.isYarnMode(application.getExecutionModeEnum())) {
       try {

Reply via email to