morhidi commented on a change in pull request #38:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/38#discussion_r818631505
##########
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:
for the time being, the job gets into an error state if it fails to
create the checkpoint:
```reconciliationStatus:
error: 'java.util.concurrent.ExecutionException:
org.apache.flink.runtime.checkpoint.CheckpointException:
Checkpoint triggering task Source: Custom Source (1/2) of job
00000000000000000000000000000000
is not being executed at the moment. Aborting checkpoint. Failure
reason: Not
all required tasks are currently running.'
```
--
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]