stevenzwu commented on code in PR #20852:
URL: https://github.com/apache/flink/pull/20852#discussion_r981949709
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java:
##########
@@ -511,6 +514,42 @@ public CompletableFuture<CompletedCheckpoint>
triggerCheckpoint(boolean isPeriod
return triggerCheckpointFromCheckpointThread(checkpointProperties,
null, isPeriodic);
}
+ /**
+ * Triggers one new checkpoint with the given checkpointType. If the given
checkpointType is
+ * null, then it will fall back to use the CheckpointCoordinator's
checkpointProperties. The
+ * return value is a future. It completes when the checkpoint triggered
finishes or an error
+ * occurred.
+ *
+ * @param checkpointType specifies the back up type of the checkpoint to
trigger.
+ * @return a future to the completed checkpoint.
+ */
+ public CompletableFuture<CompletedCheckpoint> triggerCheckpoint(
+ @Nullable CheckpointType checkpointType) {
+
+ final SnapshotType snapshotType;
+ if (checkpointType == null) {
+ snapshotType = checkpointProperties.getCheckpointType();
Review Comment:
we should rename the `getCheckpointType` method too
--
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]