Skip to content

Commit

Permalink
generalize sanity check for tolerableCpFailureNumber to re-trigger tr…
Browse files Browse the repository at this point in the history
…avis
  • Loading branch information
Myasuka committed Jun 23, 2019
1 parent 2bdd142 commit 0e55b99
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
package org.apache.flink.runtime.jobgraph.tasks;

import org.apache.flink.runtime.checkpoint.CheckpointCoordinator;
import org.apache.flink.runtime.checkpoint.CheckpointFailureManager;
import org.apache.flink.runtime.checkpoint.CheckpointRetentionPolicy;
import org.apache.flink.util.Preconditions;

import java.io.Serializable;
import java.util.Objects;

import static org.apache.flink.runtime.checkpoint.CheckpointFailureManager.UNDEFINED_TOLERABLE_CHECKPOINT_NUMBER;

/**
* Configuration settings for the {@link CheckpointCoordinator}. This includes the checkpoint
* interval, the checkpoint timeout, the pause between checkpoints, the maximum number of
Expand Down Expand Up @@ -72,7 +73,7 @@ public CheckpointCoordinatorConfiguration(
// sanity checks
if (checkpointInterval < 10 || checkpointTimeout < 10 ||
minPauseBetweenCheckpoints < 0 || maxConcurrentCheckpoints < 1 ||
tolerableCpFailureNumber < CheckpointFailureManager.UNDEFINED_TOLERABLE_CHECKPOINT_NUMBER) {
(tolerableCpFailureNumber < 0 && tolerableCpFailureNumber != UNDEFINED_TOLERABLE_CHECKPOINT_NUMBER)) {
throw new IllegalArgumentException();
}

Expand Down

0 comments on commit 0e55b99

Please sign in to comment.