SteNicholas commented on a change in pull request #38:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/38#discussion_r818642022
##########
File path:
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/FlinkService.java
##########
@@ -168,4 +169,18 @@ public void stopSessionCluster(
FlinkUtils.deleteCluster(deployment, kubernetesClient, deleteHaData);
FlinkUtils.waitForClusterShutdown(kubernetesClient, conf);
}
+
+ public void triggerSavepoint(FlinkDeployment deployment, Configuration
conf) throws Exception {
+ LOG.info("Triggering savepoint on " +
deployment.getMetadata().getName());
+ try (ClusterClient<String> clusterClient = getClusterClient(conf)) {
+ CompletableFuture<String> result =
+ clusterClient.triggerSavepoint(
+
JobID.fromHexString(deployment.getStatus().getJobStatus().getJobId()),
+ null);
+
deployment.getStatus().getJobStatus().setSavepointLocation(result.get());
Review comment:
@morhidi, it's better to add the check of the result and log the failure
information for checkpoint failure.
--
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]