You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2022/11/30 07:14:08 UTC

[incubator-streampark] branch dev updated: [Bug] cluster id bug fixed (#2108)

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 3013a6dd7 [Bug] cluster id bug fixed (#2108)
3013a6dd7 is described below

commit 3013a6dd7a6df8540b46c19f401db0a729a4e9ca
Author: benjobs <be...@apache.org>
AuthorDate: Wed Nov 30 15:14:03 2022 +0800

    [Bug] cluster id bug fixed (#2108)
    
    * [Bug] cluster id bug fixed
---
 .../core/service/impl/ApplicationServiceImpl.java       | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 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 42ff934c4..87e6601f1 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
@@ -806,10 +806,19 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Appli
             application.setCpMaxFailureInterval(appParam.getCpMaxFailureInterval());
             application.setTags(appParam.getTags());
 
-            if (ExecutionMode.YARN_APPLICATION.equals(application.getExecutionModeEnum()) ||
-                ExecutionMode.YARN_PER_JOB.equals(application.getExecutionModeEnum()) ||
-                ExecutionMode.KUBERNETES_NATIVE_APPLICATION.equals(application.getExecutionModeEnum())) {
-                application.setFlinkClusterId(null);
+            switch (appParam.getExecutionModeEnum()) {
+                case YARN_APPLICATION:
+                case YARN_PER_JOB:
+                case KUBERNETES_NATIVE_APPLICATION:
+                    application.setFlinkClusterId(null);
+                    break;
+                case REMOTE:
+                case YARN_SESSION:
+                case KUBERNETES_NATIVE_SESSION:
+                    application.setFlinkClusterId(appParam.getFlinkClusterId());
+                    break;
+                default:
+                    break;
             }
 
             // Flink Sql job...