类 CheckpointManager
java.lang.Object
org.apache.seatunnel.engine.server.checkpoint.CheckpointManager
Used to manage all checkpoints for a job.
Maintain the life cycle of the CheckpointCoordinator through the CheckpointPlan and the status of the job.
-
构造器概要
构造器构造器说明CheckpointManager(long jobId, boolean isStartWithSavePoint, com.hazelcast.spi.impl.NodeEngine nodeEngine, JobMaster jobMaster, Map<Integer, CheckpointPlan> checkpointPlanMap, org.apache.seatunnel.engine.common.config.server.CheckpointConfig checkpointConfig, ExecutorService executorService, com.hazelcast.map.IMap<Object, Object> runningJobStateIMap) -
方法概要
修饰符和类型方法说明voidacknowledgeTask(TaskAcknowledgeOperation ackOperation) Called by theTask.org.apache.seatunnel.engine.common.utils.PassiveCompletableFuture<CheckpointCoordinatorState>cancelCheckpoint(int pipelineId) Call By JobMaster If all the tasks canceled or some task failed, JobMaster will call this method to cancel checkpoint coordinator.voidclearCheckpointIfNeed(org.apache.seatunnel.engine.core.job.JobStatus jobStatus) Called by the JobMaster.getCheckpointCoordinator(int pipelineId) protected voidhandleCheckpointError(int pipelineId, boolean neverRestore) booleanisCompletedPipeline(int pipelineId) Called by the JobMaster.booleanisPipelineSavePointEnd(PipelineLocation pipelineLocation) booleanorg.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<Void>listenPipeline(int pipelineId, org.apache.seatunnel.engine.core.job.PipelineStatus pipelineStatus) Called by the JobMaster.voidreadyToClose(TaskLocation taskLocation) Called by theSourceSplitEnumeratorTask.voidreadyToCloseIdleTask(TaskLocation taskLocation) Called by theSourceSplitEnumeratorTask.voidreportCheckpointErrorFromTask(TaskLocation taskLocation, String errorMsg) voidreportedPipelineRunning(int pipelineId, boolean alreadyStarted) voidreportedTask(TaskReportStatusOperation reportStatusOperation) Called by theTask.protected com.hazelcast.spi.impl.operationservice.impl.InvocationFuture<?>sendOperationToMemberNode(TaskOperation operation) org.apache.seatunnel.engine.common.utils.PassiveCompletableFuture<CompletedCheckpoint>[]Called by the JobMaster, actually triggered by the user.voidvoidorg.apache.seatunnel.engine.common.utils.PassiveCompletableFuture<CheckpointCoordinatorState>waitCheckpointCoordinatorComplete(int pipelineId) Call By JobMaster If all the tasks is finished, JobMaster will call this method to wait checkpoint coordinator complete.
-
构造器详细资料
-
CheckpointManager
public CheckpointManager(long jobId, boolean isStartWithSavePoint, com.hazelcast.spi.impl.NodeEngine nodeEngine, JobMaster jobMaster, Map<Integer, CheckpointPlan> checkpointPlanMap, org.apache.seatunnel.engine.common.config.server.CheckpointConfig checkpointConfig, ExecutorService executorService, com.hazelcast.map.IMap<Object, throws org.apache.seatunnel.engine.checkpoint.storage.exception.CheckpointStorageExceptionObject> runningJobStateIMap) - 抛出:
org.apache.seatunnel.engine.checkpoint.storage.exception.CheckpointStorageException
-
-
方法详细资料
-
triggerSavePoints
public org.apache.seatunnel.engine.common.utils.PassiveCompletableFuture<CompletedCheckpoint>[] triggerSavePoints()Called by the JobMaster, actually triggered by the user.
After the savepoint is triggered, it will cause the job to stop automatically. -
reportedPipelineRunning
public void reportedPipelineRunning(int pipelineId, boolean alreadyStarted) -
handleCheckpointError
protected void handleCheckpointError(int pipelineId, boolean neverRestore) -
reportCheckpointErrorFromTask
-
getCheckpointCoordinator
-
reportedTask
-
readyToClose
Called by theSourceSplitEnumeratorTask.
used by SourceSplitEnumeratorTask to tell CheckpointCoordinator pipeline will trigger close barrier by SourceSplitEnumeratorTask. -
readyToCloseIdleTask
Called by theSourceSplitEnumeratorTask.
used by SourceSplitEnumeratorTask to tell CheckpointCoordinator pipeline will trigger close barrier of idle task by SourceSplitEnumeratorTask. -
listenPipeline
public org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<Void> listenPipeline(int pipelineId, org.apache.seatunnel.engine.core.job.PipelineStatus pipelineStatus) Called by the JobMaster.
Listen to thePipelineStatusof thePipeline, which is used to shut down the runningCheckpointIDCounterat the end of the pipeline. -
clearCheckpointIfNeed
public void clearCheckpointIfNeed(org.apache.seatunnel.engine.core.job.JobStatus jobStatus) Called by the JobMaster.
Listen to theJobStatusof theJob. -
isCompletedPipeline
public boolean isCompletedPipeline(int pipelineId) Called by the JobMaster.
Returns whether the pipeline has completed; No need to deploy/restore theSubPlanif the pipeline has been completed; -
acknowledgeTask
-
triggerSchemaChangeBeforeCheckpoint
public void triggerSchemaChangeBeforeCheckpoint(TriggerSchemaChangeBeforeCheckpointOperation operation) -
triggerSchemaChangeAfterCheckpoint
public void triggerSchemaChangeAfterCheckpoint(TriggerSchemaChangeAfterCheckpointOperation operation) -
isSavePointEnd
public boolean isSavePointEnd() -
isPipelineSavePointEnd
-
sendOperationToMemberNode
protected com.hazelcast.spi.impl.operationservice.impl.InvocationFuture<?> sendOperationToMemberNode(TaskOperation operation) -
cancelCheckpoint
public org.apache.seatunnel.engine.common.utils.PassiveCompletableFuture<CheckpointCoordinatorState> cancelCheckpoint(int pipelineId) Call By JobMaster If all the tasks canceled or some task failed, JobMaster will call this method to cancel checkpoint coordinator.- 参数:
pipelineId-- 返回:
-
waitCheckpointCoordinatorComplete
public org.apache.seatunnel.engine.common.utils.PassiveCompletableFuture<CheckpointCoordinatorState> waitCheckpointCoordinatorComplete(int pipelineId) Call By JobMaster If all the tasks is finished, JobMaster will call this method to wait checkpoint coordinator complete.- 参数:
pipelineId-- 返回:
-