Class ExecutionJobVertex
java.lang.Object
org.apache.flink.runtime.executiongraph.ExecutionJobVertex
- All Implemented Interfaces:
org.apache.flink.api.common.Archiveable<ArchivedExecutionJobVertex>,AccessExecutionJobVertex
- Direct Known Subclasses:
SpeculativeExecutionJobVertex
public class ExecutionJobVertex
extends Object
implements AccessExecutionJobVertex, org.apache.flink.api.common.Archiveable<ArchivedExecutionJobVertex>
An
ExecutionJobVertex is part of the ExecutionGraph, and the peer to the JobVertex.
The ExecutionJobVertex corresponds to a parallelized operation. It contains an ExecutionVertex for each parallel instance of that operation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExecutionJobVertex(InternalExecutionGraphAccessor graph, JobVertex jobVertex, VertexParallelismInformation parallelismInfo, CoordinatorStore coordinatorStore, JobManagerJobMetricGroup jobManagerJobMetricGroup) -
Method Summary
Modifier and TypeMethodDescriptionarchive()voidcancel()Cancels all currently running vertex executions.Cancels all currently running vertex executions.booleancanRescaleMaxParallelism(int desiredMaxParallelism) voidconnectToPredecessors(Map<IntermediateDataSetID, IntermediateResult> intermediateDataSets) protected ExecutionVertexcreateExecutionVertex(ExecutionJobVertex jobVertex, int subTaskIndex, IntermediateResult[] producedDataSets, Duration timeout, long createTimestamp, int executionHistorySizeLimit, int initialAttemptCount) protected OperatorCoordinatorHoldercreateOperatorCoordinatorHolder(org.apache.flink.util.SerializedValue<OperatorCoordinator.Provider> provider, ClassLoader classLoader, CoordinatorStore coordinatorStore, JobManagerJobMetricGroup jobManagerJobMetricGroup) voidReturns the aggregated user-defined accumulators as strings.static ExecutionStategetAggregateJobVertexState(int[] verticesPerState, int parallelism) A utility function that computes an "aggregated" state for the vertex.Returns the aggregatedExecutionStatefor this job vertex.getGraph()org.apache.flink.api.common.JobIDgetJobId()Returns theJobVertexIDfor this job vertex.intReturns the max parallelism for this job vertex.getName()Returns the name for this job vertex.Returns a list containing the ID pairs of all operators contained in this execution job vertex.intReturns the parallelism for this job vertex.Returns the resource profile for this job vertex.Returns the slot sharing group for this job vertex.List<SourceCoordinator<?,?>> org.apache.flink.core.io.InputSplitAssignerorg.apache.flink.types.Either<org.apache.flink.util.SerializedValue<TaskInformation>,PermanentBlobKey> Returns all execution vertices for this job vertex.protected voidinitialize(int executionHistorySizeLimit, Duration timeout, long createTimestamp, SubtaskAttemptNumberStore initialAttemptCounts) protected voidinitialize(int executionHistorySizeLimit, Duration timeout, long createTimestamp, SubtaskAttemptNumberStore initialAttemptCounts, ExecutionPlanSchedulingContext executionPlanSchedulingContext) booleanbooleanbooleanvoidsetMaxParallelism(int maxParallelism) voidsetParallelism(int parallelism) suspend()
-
Constructor Details
-
ExecutionJobVertex
@VisibleForTesting public ExecutionJobVertex(InternalExecutionGraphAccessor graph, JobVertex jobVertex, VertexParallelismInformation parallelismInfo, CoordinatorStore coordinatorStore, JobManagerJobMetricGroup jobManagerJobMetricGroup) throws JobException - Throws:
JobException
-
-
Method Details
-
initialize
@VisibleForTesting protected void initialize(int executionHistorySizeLimit, Duration timeout, long createTimestamp, SubtaskAttemptNumberStore initialAttemptCounts) throws JobException - Throws:
JobException
-
initialize
protected void initialize(int executionHistorySizeLimit, Duration timeout, long createTimestamp, SubtaskAttemptNumberStore initialAttemptCounts, ExecutionPlanSchedulingContext executionPlanSchedulingContext) throws JobException - Throws:
JobException
-
createExecutionVertex
protected ExecutionVertex createExecutionVertex(ExecutionJobVertex jobVertex, int subTaskIndex, IntermediateResult[] producedDataSets, Duration timeout, long createTimestamp, int executionHistorySizeLimit, int initialAttemptCount) -
createOperatorCoordinatorHolder
protected OperatorCoordinatorHolder createOperatorCoordinatorHolder(org.apache.flink.util.SerializedValue<OperatorCoordinator.Provider> provider, ClassLoader classLoader, CoordinatorStore coordinatorStore, JobManagerJobMetricGroup jobManagerJobMetricGroup) throws Exception - Throws:
Exception
-
isInitialized
public boolean isInitialized() -
isParallelismDecided
public boolean isParallelismDecided() -
getOperatorIDs
Returns a list containing the ID pairs of all operators contained in this execution job vertex.- Returns:
- list containing the ID pairs of all contained operators
-
setMaxParallelism
public void setMaxParallelism(int maxParallelism) -
getGraph
-
setParallelism
public void setParallelism(int parallelism) -
getJobVertex
-
getName
Description copied from interface:AccessExecutionJobVertexReturns the name for this job vertex.- Specified by:
getNamein interfaceAccessExecutionJobVertex- Returns:
- name for this job vertex.
-
getParallelism
public int getParallelism()Description copied from interface:AccessExecutionJobVertexReturns the parallelism for this job vertex.- Specified by:
getParallelismin interfaceAccessExecutionJobVertex- Returns:
- parallelism for this job vertex.
-
getMaxParallelism
public int getMaxParallelism()Description copied from interface:AccessExecutionJobVertexReturns the max parallelism for this job vertex.- Specified by:
getMaxParallelismin interfaceAccessExecutionJobVertex- Returns:
- max parallelism for this job vertex.
-
getResourceProfile
Description copied from interface:AccessExecutionJobVertexReturns the resource profile for this job vertex.- Specified by:
getResourceProfilein interfaceAccessExecutionJobVertex- Returns:
- resource profile for this job vertex.
-
canRescaleMaxParallelism
public boolean canRescaleMaxParallelism(int desiredMaxParallelism) -
getJobId
public org.apache.flink.api.common.JobID getJobId() -
getJobVertexId
Description copied from interface:AccessExecutionJobVertexReturns theJobVertexIDfor this job vertex.- Specified by:
getJobVertexIdin interfaceAccessExecutionJobVertex- Returns:
- JobVertexID for this job vertex.
-
getTaskVertices
Description copied from interface:AccessExecutionJobVertexReturns all execution vertices for this job vertex.- Specified by:
getTaskVerticesin interfaceAccessExecutionJobVertex- Returns:
- all execution vertices for this job vertex
-
getProducedDataSets
-
getSplitAssigner
public org.apache.flink.core.io.InputSplitAssigner getSplitAssigner() -
getSlotSharingGroup
Description copied from interface:AccessExecutionJobVertexReturns the slot sharing group for this job vertex.- Specified by:
getSlotSharingGroupin interfaceAccessExecutionJobVertex- Returns:
- slot sharing group for this job vertex.
-
getCoLocationGroup
-
getInputs
-
getOperatorCoordinators
-
getSourceCoordinators
-
getTaskInformationOrBlobKey
public org.apache.flink.types.Either<org.apache.flink.util.SerializedValue<TaskInformation>,PermanentBlobKey> getTaskInformationOrBlobKey() throws IOException- Throws:
IOException
-
getTaskInformation
-
getAggregateState
Description copied from interface:AccessExecutionJobVertexReturns the aggregatedExecutionStatefor this job vertex.- Specified by:
getAggregateStatein interfaceAccessExecutionJobVertex- Returns:
- aggregated state for this job vertex
-
connectToPredecessors
public void connectToPredecessors(Map<IntermediateDataSetID, IntermediateResult> intermediateDataSets) throws JobException- Throws:
JobException
-
cancel
public void cancel()Cancels all currently running vertex executions. -
cancelWithFuture
Cancels all currently running vertex executions.- Returns:
- A future that is complete once all tasks have canceled.
-
suspend
-
fail
-
isFinished
public boolean isFinished() -
getAggregatedUserAccumulatorsStringified
Description copied from interface:AccessExecutionJobVertexReturns the aggregated user-defined accumulators as strings.- Specified by:
getAggregatedUserAccumulatorsStringifiedin interfaceAccessExecutionJobVertex- Returns:
- aggregated user-defined accumulators as strings.
-
archive
- Specified by:
archivein interfaceorg.apache.flink.api.common.Archiveable<ArchivedExecutionJobVertex>
-
getAggregateJobVertexState
A utility function that computes an "aggregated" state for the vertex.This state is not used anywhere in the coordination, but can be used for display in dashboards to as a summary for how the particular parallel operation represented by this ExecutionJobVertex is currently behaving.
For example, if at least one parallel task is failed, the aggregate state is failed. If not, and at least one parallel task is cancelling (or cancelled), the aggregate state is cancelling (or cancelled). If all tasks are finished, the aggregate state is finished, and so on.
- Parameters:
verticesPerState- The number of vertices in each state (indexed by the ordinal of the ExecutionState values).parallelism- The parallelism of the ExecutionJobVertex- Returns:
- The aggregate state of this ExecutionJobVertex.
-