Class SpeculativeExecutionVertex
java.lang.Object
org.apache.flink.runtime.executiongraph.ExecutionVertex
org.apache.flink.runtime.executiongraph.SpeculativeExecutionVertex
- All Implemented Interfaces:
org.apache.flink.api.common.Archiveable<ArchivedExecutionVertex>,AccessExecutionVertex
The ExecutionVertex which supports speculative execution.
-
Field Summary
Fields inherited from class org.apache.flink.runtime.executiongraph.ExecutionVertex
NUM_BYTES_UNKNOWN -
Constructor Summary
ConstructorsConstructorDescriptionSpeculativeExecutionVertex(ExecutionJobVertex jobVertex, int subTaskIndex, IntermediateResult[] producedDataSets, Duration timeout, long createTimestamp, int executionHistorySizeLimit, int initialAttemptCount) -
Method Summary
Modifier and TypeMethodDescriptionarchive()voidarchiveFailedExecution(ExecutionAttemptID executionAttemptId) Remove execution from currentExecutions if it is failed.cancel()Cancels this ExecutionVertex.createNewSpeculativeExecution(long timestamp) voiddeploy()voiddeployToSlot(LogicalSlot slot) voidgetCurrentExecution(int attemptNumber) Returns the current execution for this execution vertex.Returns the current executions for this execution vertex.Optional<org.apache.flink.core.io.InputSplit>getNextInputSplit(String host, int attemptNumber) Gets the preferred location to execute the current task execution attempt, based on the state that the execution attempt will resume.booleanisOriginalAttempt(int attemptNumber) Returns whether the given attempt is the original execution attempt of the execution vertex, i.e. it is created along with the creation of resetting of the execution vertex.booleanvoidThis method marks the task as failed, but will make no attempt to remove task execution from the task manager.voidArchives the current Execution and creates a new Execution for this vertex.suspend()voidtryAssignResource(LogicalSlot slot) Methods inherited from class org.apache.flink.runtime.executiongraph.ExecutionVertex
addConsumedPartitionGroup, findLastAllocation, findLastLocation, finishPartitionsIfNeeded, getAllConsumedPartitionGroups, getConsumedPartitionGroup, getCurrentAssignedResource, getCurrentAssignedResourceLocation, getCurrentTaskManagerLocationFuture, getExecutionGraphAccessor, getExecutionHistory, getExecutionState, getExecutionVertexInputInfo, getFailureInfo, getID, getInputBytes, getJobId, getJobVertex, getJobvertexId, getMaxParallelism, getNumberOfInputs, getParallelSubtaskIndex, getProducedPartitions, getResourceProfile, getStateTimestamp, getTaskName, getTaskNameWithSubtaskIndex, getTotalNumberOfParallelSubtasks, setInputBytes, toString
-
Constructor Details
-
SpeculativeExecutionVertex
public SpeculativeExecutionVertex(ExecutionJobVertex jobVertex, int subTaskIndex, IntermediateResult[] producedDataSets, Duration timeout, long createTimestamp, int executionHistorySizeLimit, int initialAttemptCount)
-
-
Method Details
-
isSupportsConcurrentExecutionAttempts
public boolean isSupportsConcurrentExecutionAttempts() -
createNewSpeculativeExecution
-
isOriginalAttempt
public boolean isOriginalAttempt(int attemptNumber) Returns whether the given attempt is the original execution attempt of the execution vertex, i.e. it is created along with the creation of resetting of the execution vertex. -
getCurrentExecutions
Description copied from interface:AccessExecutionVertexReturns the current executions for this execution vertex. The returned collection must contain the current execution attempt.- Specified by:
getCurrentExecutionsin interfaceAccessExecutionVertex- Overrides:
getCurrentExecutionsin classExecutionVertex- Returns:
- current executions
-
getCurrentExecution
- Overrides:
getCurrentExecutionin classExecutionVertex
-
getPartitionProducer
- Overrides:
getPartitionProducerin classExecutionVertex
-
cancel
Description copied from class:ExecutionVertexCancels this ExecutionVertex.- Overrides:
cancelin classExecutionVertex- Returns:
- A future that completes once the execution has reached its final state.
-
suspend
- Overrides:
suspendin classExecutionVertex
-
fail
- Overrides:
failin classExecutionVertex
-
markFailed
Description copied from class:ExecutionVertexThis method marks the task as failed, but will make no attempt to remove task execution from the task manager. It is intended for cases where the task is known not to be deployed yet.- Overrides:
markFailedin classExecutionVertex- Parameters:
t- The exception that caused the task to fail.
-
resetForNewExecution
public void resetForNewExecution()Description copied from class:ExecutionVertexArchives the current Execution and creates a new Execution for this vertex.- Overrides:
resetForNewExecutionin classExecutionVertex
-
archiveFailedExecution
Remove execution from currentExecutions if it is failed. It is needed to make room for possible future speculative executions.- Parameters:
executionAttemptId- attemptID of the execution to be removed
-
getCurrentExecutionAttempt
Description copied from interface:AccessExecutionVertexReturns the current execution for this execution vertex.- Specified by:
getCurrentExecutionAttemptin interfaceAccessExecutionVertex- Overrides:
getCurrentExecutionAttemptin classExecutionVertex- Returns:
- current execution
-
getNextInputSplit
public Optional<org.apache.flink.core.io.InputSplit> getNextInputSplit(String host, int attemptNumber) - Overrides:
getNextInputSplitin classExecutionVertex
-
archive
- Specified by:
archivein interfaceorg.apache.flink.api.common.Archiveable<ArchivedExecutionVertex>- Overrides:
archivein classExecutionVertex
-
tryAssignResource
- Overrides:
tryAssignResourcein classExecutionVertex
-
deploy
public void deploy()- Overrides:
deployin classExecutionVertex
-
deployToSlot
- Overrides:
deployToSlotin classExecutionVertex
-
getPreferredLocationBasedOnState
Description copied from class:ExecutionVertexGets the preferred location to execute the current task execution attempt, based on the state that the execution attempt will resume.- Overrides:
getPreferredLocationBasedOnStatein classExecutionVertex
-