You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by GitBox <gi...@apache.org> on 2022/02/25 01:50:58 UTC

[GitHub] [flink-kubernetes-operator] wangyang0918 commented on a change in pull request #22: [FLINK-26141] Support last-state upgrade mode

wangyang0918 commented on a change in pull request #22:
URL: https://github.com/apache/flink-kubernetes-operator/pull/22#discussion_r814414928



##########
File path: flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/JobReconciler.java
##########
@@ -138,17 +134,20 @@ private void restoreFromLastSavepoint(FlinkDeployment flinkApp, Configuration ef
         deployFlinkJob(flinkApp, effectiveConfig, Optional.of(savepointLocation));
     }
 
-    private Optional<String> suspendJob(FlinkDeployment flinkApp, Configuration effectiveConfig)
-            throws Exception {
-        LOG.info("Suspending {}", flinkApp.getMetadata().getName());
-        return cancelJob(flinkApp, UpgradeMode.SAVEPOINT, effectiveConfig);
-    }
-
-    private Optional<String> cancelJob(FlinkDeployment flinkApp, Configuration effectiveConfig)
-            throws Exception {
-        LOG.info("Cancelling {}", flinkApp.getMetadata().getName());
-        UpgradeMode upgradeMode = flinkApp.getSpec().getJob().getUpgradeMode();
-        return cancelJob(flinkApp, upgradeMode, effectiveConfig);
+    private void printCancelLogs(UpgradeMode upgradeMode, String name) {

Review comment:
       If we failed to execute `getClusterClient()` in `FlinkService#cancelJob`, the logs will not show up. So I suggest to keep it 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: commits-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org