public class DefaultBatchJobRecoveryHandler extends Object implements BatchJobRecoveryHandler, JobEventReplayHandler
BatchJobRecoveryHandler and JobEventReplayHandler.| Constructor and Description |
|---|
DefaultBatchJobRecoveryHandler(JobEventManager jobEventManager,
org.apache.flink.configuration.Configuration jobMasterConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
finalizeReplay()
Called when finalizing replaying job event.
|
void |
initialize(BatchJobRecoveryContext context)
Initializes the recovery handler with the batch job recovery context.
|
boolean |
isRecovering()
Determines whether the job is recovering.
|
boolean |
needRecover()
Determines whether the job needs to undergo recovery.
|
void |
onExecutionFinished(ExecutionVertexID executionVertexId)
Records the execution vertex finished event for use during future batch job recovery.
|
void |
onExecutionJobVertexInitialization(JobVertexID jobVertexId,
int parallelism,
Map<IntermediateDataSetID,JobVertexInputInfo> jobVertexInputInfos)
Records the job vertex initialization event for use during future batch job recovery.
|
void |
onExecutionVertexReset(Collection<ExecutionVertexID> vertices)
Handles the reset event for a collection of execution vertices and records the event for use
during future batch job recovery.
|
void |
replayOneEvent(JobEvent jobEvent)
Called to replay one job event.
|
void |
startRecovering()
Starts the recovery process.
|
void |
startReplay()
Called when starting replaying job event.
|
void |
stop(boolean cleanUp)
Stops the job recovery handler and optionally clean up.
|
public DefaultBatchJobRecoveryHandler(JobEventManager jobEventManager, org.apache.flink.configuration.Configuration jobMasterConfiguration)
public void initialize(BatchJobRecoveryContext context)
BatchJobRecoveryHandlerinitialize in interface BatchJobRecoveryHandlerpublic void stop(boolean cleanUp)
BatchJobRecoveryHandlerstop in interface BatchJobRecoveryHandlercleanUp - whether to clean up.public void startRecovering()
BatchJobRecoveryHandlerstartRecovering in interface BatchJobRecoveryHandlerpublic boolean needRecover()
BatchJobRecoveryHandlerneedRecover in interface BatchJobRecoveryHandlerpublic boolean isRecovering()
BatchJobRecoveryHandlerisRecovering in interface BatchJobRecoveryHandlerpublic void startReplay()
JobEventReplayHandlerstartReplay in interface JobEventReplayHandlerpublic void replayOneEvent(JobEvent jobEvent)
JobEventReplayHandlerreplayOneEvent in interface JobEventReplayHandlerpublic void finalizeReplay()
throws Exception
JobEventReplayHandlerfinalizeReplay in interface JobEventReplayHandlerExceptionpublic void onExecutionVertexReset(Collection<ExecutionVertexID> vertices)
BatchJobRecoveryHandleronExecutionVertexReset in interface BatchJobRecoveryHandlervertices - a collection of execution vertex IDs that have been reset.public void onExecutionJobVertexInitialization(JobVertexID jobVertexId, int parallelism, Map<IntermediateDataSetID,JobVertexInputInfo> jobVertexInputInfos)
BatchJobRecoveryHandleronExecutionJobVertexInitialization in interface BatchJobRecoveryHandlerjobVertexId - the id of the job vertex being initialized.parallelism - the parallelism of the job vertex.jobVertexInputInfos - a map of intermediate dataset IDs to job vertex input info.public void onExecutionFinished(ExecutionVertexID executionVertexId)
BatchJobRecoveryHandleronExecutionFinished in interface BatchJobRecoveryHandlerexecutionVertexId - the id of the execution vertex is finished.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.