leletan commented on code in PR #20852:
URL: https://github.com/apache/flink/pull/20852#discussion_r974870165


##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMasterGateway.java:
##########
@@ -218,13 +220,27 @@ CompletableFuture<String> triggerSavepoint(
             final SavepointFormatType formatType,
             @RpcTimeout final Time timeout);
 
+    /**
+     * Triggers taking a checkpoint of the executed job.
+     *
+     * @param checkpointProperties to determine how checkpoint should be taken 
or null if the
+     *     existing checkpoint property should be used
+     * @param timeout for the rpc call
+     * @return Future which is completed with the savepoint path once completed
+     */
+    CompletableFuture<CompletedCheckpoint> triggerCheckpoint(

Review Comment:
   Good question, @pnowojski. 
   Assuming we are talking about 
   1. `CompletableFuture<String> triggerCheckpoint(@RpcTimeout final Time 
timeout)` as the other method 
   2. `CompletedOperationCache<AsynchronousJobOperationKey, Long> 
checkpointTriggerCache` in the `DispatcherCachedOperationsHandler` as the cache 
(location as cache value?)
   We definitely can. Meanwhile I guess this means that the restful API 
(checkpoint trigger status API) will eventually return checkpoint location in 
the restful response body, instead of checkpoint id.
   
   The reason for returning `CompletedCheckpoint` was to facilitate both old 
method and new API: the new restful API was returning checkpoint id, while the 
other method was returning checkpoint location, and CompletedCheckpoint 
contains both.
   
   I am pretty new to flink so I am not sure what people typically care about a 
checkpoint.
   If we think it is a better design to return checkpoint location, instead of 
checkpoint id in the response body in the restful API, I am happy to return 
checkpoint location and reuse existing cache and another method. 



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

Reply via email to