morhidi commented on a change in pull request #38:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/38#discussion_r818819491
##########
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:
@SteNicholas what kind of check do you think is relevant here on the
result returned? We could wrap the call in a try-catch, but in this case the
user won't get any feedback on the failed savepoint operation. @gyfora
@wangyang0918 what do you think? Shall we introduce a new Savepoint object
instead of the current savepointLocation field to track the result, error,
timestamp etc?
--
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]