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/03/20 11:08:22 UTC

[GitHub] [flink-kubernetes-operator] Aitozi commented on a change in pull request #85: [FLINK-26538] Add ability to restart flink deployment

Aitozi commented on a change in pull request #85:
URL: https://github.com/apache/flink-kubernetes-operator/pull/85#discussion_r830598979



##########
File path: flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/JobReconciler.java
##########
@@ -114,6 +119,14 @@ public void reconcile(FlinkDeployment flinkApp, Context context, Configuration e
         }
     }
 
+    private void restart(FlinkDeployment flinkApp, Configuration effectiveConfig) throws Exception {
+        LOG.info("Restart application cluster now.");
+        String jobIdString = flinkApp.getStatus().getJobStatus().getJobId();
+        JobID jobID = jobIdString != null ? JobID.fromHexString(jobIdString) : null;
+        flinkService.cancelJob(jobID, UpgradeMode.LAST_STATE, effectiveConfig);

Review comment:
       Yes. IMO, the restart semantic will let the job keep running from the latest checkpoint. So the HA config is retained.




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