Interface BatchJobRecoveryHandler
-
- All Known Implementing Classes:
DefaultBatchJobRecoveryHandler,DummyBatchJobRecoveryHandler
public interface BatchJobRecoveryHandlerInterface for handling batch job recovery.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinitialize(BatchJobRecoveryContext batchJobRecoveryContext)Initializes the recovery handler with the batch job recovery context.booleanisRecovering()Determines whether the job is recovering.booleanneedRecover()Determines whether the job needs to undergo recovery.voidonExecutionFinished(ExecutionVertexID executionVertexId)Records the execution vertex finished event for use during future batch job recovery.voidonExecutionJobVertexInitialization(JobVertexID jobVertexId, int parallelism, Map<IntermediateDataSetID,JobVertexInputInfo> jobVertexInputInfos)Records the job vertex initialization event for use during future batch job recovery.voidonExecutionVertexReset(Collection<ExecutionVertexID> vertices)Handles the reset event for a collection of execution vertices and records the event for use during future batch job recovery.voidstartRecovering()Starts the recovery process.voidstop(boolean cleanUp)Stops the job recovery handler and optionally clean up.
-
-
-
Method Detail
-
initialize
void initialize(BatchJobRecoveryContext batchJobRecoveryContext)
Initializes the recovery handler with the batch job recovery context.
-
startRecovering
void startRecovering()
Starts the recovery process.
-
stop
void stop(boolean cleanUp)
Stops the job recovery handler and optionally clean up.- Parameters:
cleanUp- whether to clean up.
-
needRecover
boolean needRecover()
Determines whether the job needs to undergo recovery.
-
isRecovering
boolean isRecovering()
Determines whether the job is recovering.
-
onExecutionVertexReset
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.- Parameters:
vertices- a collection of execution vertex IDs that have been reset.
-
onExecutionJobVertexInitialization
void onExecutionJobVertexInitialization(JobVertexID jobVertexId, int parallelism, Map<IntermediateDataSetID,JobVertexInputInfo> jobVertexInputInfos)
Records the job vertex initialization event for use during future batch job recovery.- Parameters:
jobVertexId- 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.
-
onExecutionFinished
void onExecutionFinished(ExecutionVertexID executionVertexId)
Records the execution vertex finished event for use during future batch job recovery.- Parameters:
executionVertexId- the id of the execution vertex is finished.
-
-