caicancai commented on code in PR #3426:
URL: 
https://github.com/apache/incubator-streampark/pull/3426#discussion_r1436287695


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/application/impl/ApplicationManageServiceImpl.java:
##########
@@ -463,6 +471,19 @@ public Long copy(Application appParam) {
   public boolean update(Application appParam) {
     Application application = getById(appParam.getId());
 
+    /* If the original mode is remote, k8s-session, yarn-session, check 
cluster status */
+    FlinkExecutionMode flinkExecutionMode = 
application.getFlinkExecutionMode();
+    switch (flinkExecutionMode) {
+      case REMOTE:
+      case YARN_SESSION:
+      case KUBERNETES_NATIVE_SESSION:
+        FlinkCluster flinkCluster = 
flinkClusterService.getById(application.getFlinkClusterId());
+        ApiAlertException.throwIfFalse(
+            flinkClusterWatcher.getClusterState(flinkCluster) == 
ClusterState.RUNNING,
+            "[StreamPark] update failed, because bind flink cluster not 
running");

Review Comment:
   What I mean is, [StreamPark] update failed, because bind flink cluster not 
running, this log can be more concise



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/application/impl/ApplicationManageServiceImpl.java:
##########
@@ -463,6 +471,19 @@ public Long copy(Application appParam) {
   public boolean update(Application appParam) {
     Application application = getById(appParam.getId());
 
+    /* If the original mode is remote, k8s-session, yarn-session, check 
cluster status */
+    FlinkExecutionMode flinkExecutionMode = 
application.getFlinkExecutionMode();
+    switch (flinkExecutionMode) {
+      case REMOTE:
+      case YARN_SESSION:
+      case KUBERNETES_NATIVE_SESSION:
+        FlinkCluster flinkCluster = 
flinkClusterService.getById(application.getFlinkClusterId());
+        ApiAlertException.throwIfFalse(
+            flinkClusterWatcher.getClusterState(flinkCluster) == 
ClusterState.RUNNING,
+            "[StreamPark] update failed, because bind flink cluster not 
running");

Review Comment:
   What I mean is, [StreamPark] update failed, because bind flink cluster not 
running, this log can be more concise,



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to