public class ExecutionVertex extends Object implements AccessExecutionVertex, 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,
Time timeout,
long createTimestamp,
int maxPriorExecutionHistoryLength,
int initialAttemptCount)
Creates an ExecutionVertex.
|
public static final int MAX_DISTINCT_LOCATIONS_TO_CONSIDER
@VisibleForTesting public ExecutionVertex(ExecutionJobVertex jobVertex, int subTaskIndex, IntermediateResult[] producedDataSets, 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 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 AccessExecutionVertex
public int getTotalNumberOfParallelSubtasks()
public int getMaxParallelism()
public ResourceProfile getResourceProfile()
public int getParallelSubtaskIndex()
AccessExecutionVertex
getParallelSubtaskIndex
in interface AccessExecutionVertex
public ExecutionVertexID getID()
public int getNumberOfInputs()
public List<ConsumedPartitionGroup> getAllConsumedPartitionGroups()
public ConsumedPartitionGroup getConsumedPartitionGroup(int input)
public InputSplit getNextInputSplit(String host)
public Execution getCurrentExecutionAttempt()
AccessExecutionVertex
getCurrentExecutionAttempt
in interface AccessExecutionVertex
public ExecutionState getExecutionState()
AccessExecutionVertex
ExecutionState
for this execution vertex.getExecutionState
in interface AccessExecutionVertex
public long getStateTimestamp(ExecutionState state)
AccessExecutionVertex
ExecutionState
.getStateTimestamp
in interface AccessExecutionVertex
state
- state for which the timestamp should be returnedpublic Optional<ErrorInfo> getFailureInfo()
AccessExecutionVertex
getFailureInfo
in interface AccessExecutionVertex
Optional
of ErrorInfo
, or an empty
Optional
if no exception was caught.public CompletableFuture<TaskManagerLocation> getCurrentTaskManagerLocationFuture()
public LogicalSlot getCurrentAssignedResource()
public TaskManagerLocation getCurrentAssignedResourceLocation()
AccessExecutionVertex
TaskManagerLocation
for this execution vertex.getCurrentAssignedResourceLocation
in interface AccessExecutionVertex
@Nullable public ArchivedExecution getPriorExecutionAttempt(int attemptNumber)
AccessExecutionVertex
getPriorExecutionAttempt
in interface AccessExecutionVertex
attemptNumber
- 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
JobException
public 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 Archiveable<ArchivedExecutionVertex>
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.