zhoulii commented on code in PR #2937:
URL: 
https://github.com/apache/incubator-streampark/pull/2937#discussion_r1292936144


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java:
##########
@@ -1319,16 +1320,19 @@ public void cancel(Application appParam) throws 
Exception {
                 savePoint.setCreateTime(new Date());
                 savePoint.setTriggerTime(triggerTime);
                 savePointService.save(savePoint);
+                log.info("savePoint path: {} is saved", savePointDir);
               }
               if (isKubernetesApp(application)) {
                 k8SFlinkTrackMonitor.unWatching(toTrackId(application));
+                log.info("k8SFlinkTrackMonitor.unWatching");

Review Comment:
   we can make the log more readable.



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java:
##########
@@ -1319,16 +1320,19 @@ public void cancel(Application appParam) throws 
Exception {
                 savePoint.setCreateTime(new Date());
                 savePoint.setTriggerTime(triggerTime);
                 savePointService.save(savePoint);
+                log.info("savePoint path: {} is saved", savePointDir);
               }
               if (isKubernetesApp(application)) {
                 k8SFlinkTrackMonitor.unWatching(toTrackId(application));
+                log.info("k8SFlinkTrackMonitor.unWatching");
               }
             },
             e -> {
               if (e.getCause() instanceof CancellationException) {
                 updateToStopped(application);
+                log.info("updateToStopped");

Review Comment:
   same as above.



##########
streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/StopApplicationModal.vue:
##########
@@ -79,6 +79,17 @@
         defaultValue: false,
         afterItem: () => h('span', { class: 'conf-switch' }, 'Send max 
watermark before stopped'),
       },
+      {
+        field: 'nativeFormat',
+        label: 'NativeFormat',
+        component: 'Switch',
+        componentProps: {
+          checkedChildren: 'ON',
+          unCheckedChildren: 'OFF',
+        },
+        defaultValue: false,
+        afterItem: () => h('span', { class: 'conf-switch' }, 'Use savepoint 
native format'),
+      },

Review Comment:
   It's better hide this component when canceling without savepoint, besides, 
we may provide more info for users, like native format is supported since flink 
1.15.



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java:
##########
@@ -1319,16 +1320,19 @@ public void cancel(Application appParam) throws 
Exception {
                 savePoint.setCreateTime(new Date());
                 savePoint.setTriggerTime(triggerTime);
                 savePointService.save(savePoint);
+                log.info("savePoint path: {} is saved", savePointDir);
               }
               if (isKubernetesApp(application)) {
                 k8SFlinkTrackMonitor.unWatching(toTrackId(application));
+                log.info("k8SFlinkTrackMonitor.unWatching");
               }
             },
             e -> {
               if (e.getCause() instanceof CancellationException) {
                 updateToStopped(application);
+                log.info("updateToStopped");
               } else {
-                log.error("stop flink job fail.", e);
+                log.info("stop flink job fail.", e);

Review Comment:
   maybe  'log.warn' is better here.



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/AccessTokenController.java:
##########
@@ -186,6 +186,7 @@ public RestResponse copyRestApiCurl(
               .addFormData("id", appId)
               .addFormData("savePointed", "false")
               .addFormData("drain", "false")
+              .addFormData("type", "canonical")

Review Comment:
   `flink/app/cancel` does not take a parameter named `type`, maybe you mean  
`.addFormData("nativeFormat", "false")` here.



-- 
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