rkhachatryan commented on code in PR #27441:
URL: https://github.com/apache/flink/pull/27441#discussion_r2712870774
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorDeActivator.java:
##########
@@ -18,35 +18,33 @@
package org.apache.flink.runtime.checkpoint;
-import org.apache.flink.api.common.JobID;
import org.apache.flink.api.common.JobStatus;
+import org.apache.flink.runtime.execution.ExecutionState;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.executiongraph.ExecutionStateUpdateListener;
import org.apache.flink.runtime.executiongraph.JobStatusListener;
-import static org.apache.flink.util.Preconditions.checkNotNull;
-
/**
* This actor listens to changes in the JobStatus and activates or deactivates
the periodic
* checkpoint scheduler.
*/
-public class CheckpointCoordinatorDeActivator implements JobStatusListener {
-
- private final CheckpointCoordinator coordinator;
- private final boolean allTasksOutputNonBlocking;
+public interface CheckpointCoordinatorDeActivator
+ extends JobStatusListener, ExecutionStateUpdateListener {
- public CheckpointCoordinatorDeActivator(
+ static CheckpointCoordinatorDeActivator forJobStatus(
CheckpointCoordinator coordinator, boolean
allTasksOutputNonBlocking) {
- this.coordinator = checkNotNull(coordinator);
- this.allTasksOutputNonBlocking = allTasksOutputNonBlocking;
+ return (jobId, newJobStatus, timestamp) -> {
+ if (newJobStatus == JobStatus.RUNNING &&
allTasksOutputNonBlocking) {
Review Comment:
The check is in `CheckpointCoordinator.createActivatorDeactivator`, but as
mentioned above, I'm going to remove this option.
--
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]