public class ExecutionVertex extends Object implements AccessExecutionVertex, org.apache.flink.api.common.Archiveable<ArchivedExecutionVertex>
Execution.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_DISTINCT_LOCATIONS_TO_CONSIDER |
| Constructor and Description |
|---|
ExecutionVertex(ExecutionJobVertex jobVertex,
int subTaskIndex,
IntermediateResult[] producedDataSets,
org.apache.flink.api.common.time.Time timeout,
long createTimestamp,
int maxPriorExecutionHistoryLength,
int initialAttemptCount)
Creates an ExecutionVertex.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumedPartitionGroup(ConsumedPartitionGroup consumedPartitions) |
ArchivedExecutionVertex |
archive() |
CompletableFuture<?> |
cancel()
Cancels this ExecutionVertex.
|
void |
deploy() |
void |
deployToSlot(LogicalSlot slot) |
void |
fail(Throwable t) |
Optional<AllocationID> |
findLastAllocation() |
Optional<TaskManagerLocation> |
findLastLocation()
Gets the location that an execution of this vertex was assigned to.
|
List<IntermediateResultPartition> |
finishAllBlockingPartitions()
Returns all blocking result partitions whose receivers can be scheduled/updated.
|
List<ConsumedPartitionGroup> |
getAllConsumedPartitionGroups() |
ConsumedPartitionGroup |
getConsumedPartitionGroup(int input) |
LogicalSlot |
getCurrentAssignedResource() |
TaskManagerLocation |
getCurrentAssignedResourceLocation()
Returns the
TaskManagerLocation for this execution vertex. |
Execution |
getCurrentExecutionAttempt()
Returns the current execution for this execution vertex.
|
CompletableFuture<TaskManagerLocation> |
getCurrentTaskManagerLocationFuture() |
InternalExecutionGraphAccessor |
getExecutionGraphAccessor() |
ExecutionState |
getExecutionState()
Returns the current
ExecutionState for this execution vertex. |
Optional<ErrorInfo> |
getFailureInfo()
Returns the exception that caused the job to fail.
|
ExecutionVertexID |
getID() |
org.apache.flink.api.common.JobID |
getJobId() |
ExecutionJobVertex |
getJobVertex() |
JobVertexID |
getJobvertexId() |
int |
getMaxParallelism() |
org.apache.flink.core.io.InputSplit |
getNextInputSplit(String host) |
int |
getNumberOfInputs() |
int |
getParallelSubtaskIndex()
Returns the subtask index of this execution vertex.
|
Optional<TaskManagerLocation> |
getPreferredLocationBasedOnState()
Gets the preferred location to execute the current task execution attempt, based on the state
that the execution attempt will resume.
|
ArchivedExecution |
getPriorExecutionAttempt(int attemptNumber)
Returns the execution for the given attempt number.
|
Map<IntermediateResultPartitionID,IntermediateResultPartition> |
getProducedPartitions() |
ResourceProfile |
getResourceProfile() |
long |
getStateTimestamp(ExecutionState state)
Returns the timestamp for the given
ExecutionState. |
String |
getTaskName() |
String |
getTaskNameWithSubtaskIndex()
Creates a simple name representation in the style 'taskname (x/y)', where 'taskname' is the
name as returned by
getTaskName(), 'x' is the parallel subtask index as returned by
getParallelSubtaskIndex()+ 1, and 'y' is the total number of tasks, as
returned by getTotalNumberOfParallelSubtasks(). |
int |
getTotalNumberOfParallelSubtasks() |
void |
markFailed(Throwable t)
This method marks the task as failed, but will make no attempt to remove task execution from
the task manager.
|
void |
resetForNewExecution()
Archives the current Execution and creates a new Execution for this vertex.
|
CompletableFuture<?> |
suspend() |
String |
toString() |
void |
tryAssignResource(LogicalSlot slot) |
public static final int MAX_DISTINCT_LOCATIONS_TO_CONSIDER
@VisibleForTesting public ExecutionVertex(ExecutionJobVertex jobVertex, int subTaskIndex, IntermediateResult[] producedDataSets, org.apache.flink.api.common.time.Time timeout, long createTimestamp, int maxPriorExecutionHistoryLength, int initialAttemptCount)
timeout - The RPC timeout to use for deploy / cancel callscreateTimestamp - The timestamp for the vertex creation, used to initialize the first
Execution with.maxPriorExecutionHistoryLength - The number of prior Executions (= execution attempts)
to keep.initialAttemptCount - The attempt number of the first execution of this vertex.public org.apache.flink.api.common.JobID getJobId()
public ExecutionJobVertex getJobVertex()
public JobVertexID getJobvertexId()
public String getTaskName()
public String getTaskNameWithSubtaskIndex()
getTaskName(), 'x' is the parallel subtask index as returned by
getParallelSubtaskIndex()+ 1, and 'y' is the total number of tasks, as
returned by getTotalNumberOfParallelSubtasks().getTaskNameWithSubtaskIndex in interface AccessExecutionVertexpublic int getTotalNumberOfParallelSubtasks()
public int getMaxParallelism()
public ResourceProfile getResourceProfile()
public int getParallelSubtaskIndex()
AccessExecutionVertexgetParallelSubtaskIndex in interface AccessExecutionVertexpublic ExecutionVertexID getID()
public int getNumberOfInputs()
public List<ConsumedPartitionGroup> getAllConsumedPartitionGroups()
public ConsumedPartitionGroup getConsumedPartitionGroup(int input)
public org.apache.flink.core.io.InputSplit getNextInputSplit(String host)
public Execution getCurrentExecutionAttempt()
AccessExecutionVertexgetCurrentExecutionAttempt in interface AccessExecutionVertexpublic ExecutionState getExecutionState()
AccessExecutionVertexExecutionState for this execution vertex.getExecutionState in interface AccessExecutionVertexpublic long getStateTimestamp(ExecutionState state)
AccessExecutionVertexExecutionState.getStateTimestamp in interface AccessExecutionVertexstate - state for which the timestamp should be returnedpublic Optional<ErrorInfo> getFailureInfo()
AccessExecutionVertexgetFailureInfo in interface AccessExecutionVertexOptional of ErrorInfo, or an empty
Optional if no exception was caught.public CompletableFuture<TaskManagerLocation> getCurrentTaskManagerLocationFuture()
public LogicalSlot getCurrentAssignedResource()
public TaskManagerLocation getCurrentAssignedResourceLocation()
AccessExecutionVertexTaskManagerLocation for this execution vertex.getCurrentAssignedResourceLocation in interface AccessExecutionVertex@Nullable public ArchivedExecution getPriorExecutionAttempt(int attemptNumber)
AccessExecutionVertexgetPriorExecutionAttempt in interface AccessExecutionVertexattemptNumber - attempt number of execution to be returnedpublic Optional<TaskManagerLocation> findLastLocation()
public Optional<AllocationID> findLastAllocation()
public final InternalExecutionGraphAccessor getExecutionGraphAccessor()
public Map<IntermediateResultPartitionID,IntermediateResultPartition> getProducedPartitions()
public void addConsumedPartitionGroup(ConsumedPartitionGroup consumedPartitions)
public Optional<TaskManagerLocation> getPreferredLocationBasedOnState()
public void resetForNewExecution()
public void tryAssignResource(LogicalSlot slot)
public void deploy()
throws JobException
JobException@VisibleForTesting public void deployToSlot(LogicalSlot slot) throws JobException
JobExceptionpublic CompletableFuture<?> cancel()
public CompletableFuture<?> suspend()
public void fail(Throwable t)
public void markFailed(Throwable t)
t - The exception that caused the task to fail.@VisibleForTesting public List<IntermediateResultPartition> finishAllBlockingPartitions()
public ArchivedExecutionVertex archive()
archive in interface org.apache.flink.api.common.Archiveable<ArchivedExecutionVertex>Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.