You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by zh...@apache.org on 2020/06/29 14:12:02 UTC

[flink] 02/05: [hotfix][conf] Fix javadoc of CheckpointConfig#isUnalignedCheckpointsEnabled.

This is an automated email from the ASF dual-hosted git repository.

zhijiang pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git

commit fc1ad10f81c11385ef9ea88d6dbd7684067714ef
Author: Arvid Heise <ar...@ververica.com>
AuthorDate: Mon Jun 22 13:27:01 2020 +0200

    [hotfix][conf] Fix javadoc of CheckpointConfig#isUnalignedCheckpointsEnabled.
---
 .../streaming/api/environment/CheckpointConfig.java | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java
index 7644004..29190b0 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java
@@ -382,7 +382,7 @@ public class CheckpointConfig implements java.io.Serializable {
 	}
 
 	/**
-	 * Enables unaligned checkpoints, which greatly reduces checkpointing times under backpressure.
+	 * Enables unaligned checkpoints, which greatly reduce checkpointing times under backpressure.
 	 *
 	 * <p>Unaligned checkpoints contain data stored in buffers as part of the checkpoint state, which allows
 	 * checkpoint barriers to overtake these buffers. Thus, the checkpoint duration becomes independent of the
@@ -399,9 +399,24 @@ public class CheckpointConfig implements java.io.Serializable {
 	}
 
 	/**
-	 * Returns whether checkpoints should be persisted externally.
+	 * Enables unaligned checkpoints, which greatly reduce checkpointing times under backpressure.
 	 *
-	 * @return <code>true</code> if checkpoints should be externalized.
+	 * <p>Unaligned checkpoints contain data stored in buffers as part of the checkpoint state, which allows
+	 * checkpoint barriers to overtake these buffers. Thus, the checkpoint duration becomes independent of the
+	 * current throughput as checkpoint barriers are effectively not embedded into the stream of data anymore.
+	 *
+	 * <p>Unaligned checkpoints can only be enabled if {@link #checkpointingMode} is
+	 * {@link CheckpointingMode#EXACTLY_ONCE}.
+	 */
+	@PublicEvolving
+	public void enableUnalignedCheckpoints() {
+		enableUnalignedCheckpoints(true);
+	}
+
+	/**
+	 * Returns whether unaligned checkpoints are enabled.
+	 *
+	 * @return <code>true</code> if unaligned checkpoints are enabled.
 	 */
 	@PublicEvolving
 	public boolean isUnalignedCheckpointsEnabled() {