public class DefaultExecutionGraph extends Object implements ExecutionGraph, InternalExecutionGraphAccessor
ExecutionGraph.| 构造器和说明 |
|---|
DefaultExecutionGraph(JobInformation jobInformation,
ScheduledExecutorService futureExecutor,
Executor ioExecutor,
org.apache.flink.api.common.time.Time rpcTimeout,
int executionHistorySizeLimit,
ClassLoader userClassLoader,
BlobWriter blobWriter,
PartitionGroupReleaseStrategy.Factory partitionGroupReleaseStrategyFactory,
ShuffleMaster<?> shuffleMaster,
JobMasterPartitionTracker partitionTracker,
TaskDeploymentDescriptorFactory.PartitionLocationConstraint partitionLocationConstraint,
ExecutionDeploymentListener executionDeploymentListener,
ExecutionStateUpdateListener executionStateUpdateListener,
long initializationTimestamp,
VertexAttemptNumberStore initialAttemptCounts,
VertexParallelismStore vertexParallelismStore,
boolean isDynamic,
ExecutionJobVertex.Factory executionJobVertexFactory,
List<JobStatusHook> jobStatusHooks) |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,org.apache.flink.util.OptionalFailure<org.apache.flink.api.common.accumulators.Accumulator<?,?>>> |
aggregateUserAccumulators()
Merges all accumulator results from the tasks previously executed in the Executions.
|
void |
attachJobGraph(List<JobVertex> topologicallySorted) |
void |
cancel() |
protected org.apache.flink.util.concurrent.FutureUtils.ConjunctFuture<Void> |
cancelVerticesAsync() |
void |
deleteBlobs(List<PermanentBlobKey> blobKeys) |
void |
deregisterExecution(Execution exec) |
void |
enableCheckpointing(CheckpointCoordinatorConfiguration chkConfig,
List<MasterTriggerRestoreHook<?>> masterHooks,
CheckpointIDCounter checkpointIDCounter,
CompletedCheckpointStore checkpointStore,
StateBackend checkpointStateBackend,
CheckpointStorage checkpointStorage,
CheckpointStatsTracker statsTracker,
CheckpointsCleaner checkpointsCleaner,
String changelogStorageName) |
void |
failGlobal(Throwable t)
Fails the execution graph globally.
|
void |
failJob(Throwable cause,
long timestamp) |
Optional<AccessExecution> |
findExecution(ExecutionAttemptID attemptId) |
Optional<String> |
findVertexWithAttempt(ExecutionAttemptID attemptId) |
StringifiedAccumulatorResult[] |
getAccumulatorResultsStringified()
Returns the a stringified version of the user-defined accumulators.
|
Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> |
getAccumulatorsSerialized()
Gets a serialized accumulator map.
|
Iterable<ExecutionVertex> |
getAllExecutionVertices()
Returns an iterable containing all execution vertices for this execution graph.
|
Map<IntermediateDataSetID,IntermediateResult> |
getAllIntermediateResults() |
Map<JobVertexID,ExecutionJobVertex> |
getAllVertices()
Returns a map containing all job vertices for this execution graph.
|
org.apache.flink.api.common.ArchivedExecutionConfig |
getArchivedExecutionConfig()
Returns the serializable
ArchivedExecutionConfig. |
BlobWriter |
getBlobWriter() |
Optional<String> |
getChangelogStorageName()
Returns the changelog storage name for this ExecutionGraph.
|
CheckpointCoordinator |
getCheckpointCoordinator() |
CheckpointCoordinatorConfiguration |
getCheckpointCoordinatorConfiguration()
Returns the
CheckpointCoordinatorConfiguration or null if checkpointing
is disabled. |
CheckpointStatsSnapshot |
getCheckpointStatsSnapshot()
Returns a snapshot of the checkpoint statistics or
null if checkpointing is
disabled. |
Optional<String> |
getCheckpointStorageName()
Returns the checkpoint storage name for this ExecutionGraph.
|
List<ShuffleDescriptor> |
getClusterPartitionShuffleDescriptors(IntermediateDataSetID intermediateDataSetID)
Get the shuffle descriptors of the cluster partitions ordered by partition number.
|
EdgeManager |
getEdgeManager() |
ExecutionDeploymentListener |
getExecutionDeploymentListener() |
ExecutionGraphID |
getExecutionGraphID() |
ExecutionVertex |
getExecutionVertexOrThrow(ExecutionVertexID id) |
Throwable |
getFailureCause() |
ErrorInfo |
getFailureInfo()
Returns the exception that caused the job to fail.
|
Executor |
getFutureExecutor()
Returns the ExecutionContext associated with this ExecutionGraph.
|
org.apache.flink.configuration.Configuration |
getJobConfiguration() |
org.apache.flink.api.common.JobID |
getJobID()
Returns the
JobID for this execution graph. |
org.apache.flink.types.Either<org.apache.flink.util.SerializedValue<JobInformation>,PermanentBlobKey> |
getJobInformationOrBlobKey() |
org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor |
getJobMasterMainThreadExecutor() |
String |
getJobName()
Returns the job name for the execution graph.
|
ExecutionJobVertex |
getJobVertex(JobVertexID id)
Returns the job vertex for the given
JobVertexID. |
String |
getJsonPlan()
Returns the job plan as a JSON string.
|
KvStateLocationRegistry |
getKvStateLocationRegistry() |
long |
getNumberOfRestarts()
Gets the number of restarts, including full restarts and fine grained restarts.
|
int |
getNumFinishedVertices() |
PartitionGroupReleaseStrategy |
getPartitionGroupReleaseStrategy() |
TaskDeploymentDescriptorFactory.PartitionLocationConstraint |
getPartitionLocationConstraint() |
JobMasterPartitionTracker |
getPartitionTracker() |
Map<ExecutionAttemptID,Execution> |
getRegisteredExecutions() |
ResultPartitionAvailabilityChecker |
getResultPartitionAvailabilityChecker() |
IntermediateResultPartition |
getResultPartitionOrThrow(IntermediateResultPartitionID id) |
SchedulingTopology |
getSchedulingTopology() |
ShuffleMaster<?> |
getShuffleMaster() |
org.apache.flink.api.common.JobStatus |
getState()
Returns the current
JobStatus for this execution graph. |
Optional<String> |
getStateBackendName()
Returns the state backend name for this ExecutionGraph.
|
long |
getStatusTimestamp(org.apache.flink.api.common.JobStatus status)
Returns the timestamp for the given
JobStatus. |
CompletableFuture<org.apache.flink.api.common.JobStatus> |
getTerminationFuture()
Returns the termination future of this
ExecutionGraph. |
ClassLoader |
getUserClassLoader() |
Iterable<ExecutionJobVertex> |
getVerticesTopologically()
Returns an iterable containing all job vertices for this execution graph in the order they
were created.
|
void |
incrementRestarts() |
void |
initFailureCause(Throwable t,
long timestamp) |
void |
initializeJobVertex(ExecutionJobVertex ejv,
long createTimestamp)
Initialize the given execution job vertex, mainly includes creating execution vertices
according to the parallelism, and connecting to the predecessors.
|
org.apache.flink.util.TernaryBoolean |
isChangelogStateBackendEnabled()
Returns whether the state changelog is enabled for this ExecutionGraph.
|
boolean |
isDynamic() |
boolean |
isStoppable()
Returns whether the job for this execution graph is stoppable.
|
void |
jobVertexFinished()
Called whenever a job vertex reaches state FINISHED (completed successfully).
|
void |
jobVertexUnFinished() |
void |
notifyExecutionChange(Execution execution,
ExecutionState previousState,
ExecutionState newExecutionState) |
void |
notifyNewlyInitializedJobVertices(List<ExecutionJobVertex> vertices)
Notify that some job vertices have been newly initialized, execution graph will try to update
scheduling topology.
|
void |
notifySchedulerNgAboutInternalTaskFailure(ExecutionAttemptID attemptId,
Throwable t,
boolean cancelTask,
boolean releasePartitions) |
void |
registerExecution(Execution exec) |
void |
registerJobStatusListener(JobStatusListener listener) |
void |
setInternalTaskFailuresListener(InternalFailuresListener internalTaskFailuresListener) |
void |
setJsonPlan(String jsonPlan) |
void |
start(org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor jobMasterMainThreadExecutor) |
void |
suspend(Throwable suspensionCause)
Suspends the current ExecutionGraph.
|
boolean |
transitionState(org.apache.flink.api.common.JobStatus current,
org.apache.flink.api.common.JobStatus newState) |
void |
transitionToRunning() |
void |
updateAccumulators(AccumulatorSnapshot accumulatorSnapshot)
Updates the accumulators during the runtime of a job.
|
boolean |
updateState(TaskExecutionStateTransition state)
Updates the state of one of the ExecutionVertex's Execution attempts.
|
org.apache.flink.api.common.JobStatus |
waitUntilTerminal() |
public DefaultExecutionGraph(JobInformation jobInformation, ScheduledExecutorService futureExecutor, Executor ioExecutor, org.apache.flink.api.common.time.Time rpcTimeout, int executionHistorySizeLimit, ClassLoader userClassLoader, BlobWriter blobWriter, PartitionGroupReleaseStrategy.Factory partitionGroupReleaseStrategyFactory, ShuffleMaster<?> shuffleMaster, JobMasterPartitionTracker partitionTracker, TaskDeploymentDescriptorFactory.PartitionLocationConstraint partitionLocationConstraint, ExecutionDeploymentListener executionDeploymentListener, ExecutionStateUpdateListener executionStateUpdateListener, long initializationTimestamp, VertexAttemptNumberStore initialAttemptCounts, VertexParallelismStore vertexParallelismStore, boolean isDynamic, ExecutionJobVertex.Factory executionJobVertexFactory, List<JobStatusHook> jobStatusHooks) throws IOException
IOExceptionpublic void start(@Nonnull org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor jobMasterMainThreadExecutor)
start 在接口中 ExecutionGraphpublic SchedulingTopology getSchedulingTopology()
getSchedulingTopology 在接口中 ExecutionGraphpublic TaskDeploymentDescriptorFactory.PartitionLocationConstraint getPartitionLocationConstraint()
@Nonnull public org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor getJobMasterMainThreadExecutor()
public org.apache.flink.util.TernaryBoolean isChangelogStateBackendEnabled()
AccessExecutionGraphisChangelogStateBackendEnabled 在接口中 AccessExecutionGraphpublic Optional<String> getStateBackendName()
AccessExecutionGraphgetStateBackendName 在接口中 AccessExecutionGraphpublic Optional<String> getCheckpointStorageName()
AccessExecutionGraphgetCheckpointStorageName 在接口中 AccessExecutionGraphpublic Optional<String> getChangelogStorageName()
AccessExecutionGraphgetChangelogStorageName 在接口中 AccessExecutionGraphpublic void enableCheckpointing(CheckpointCoordinatorConfiguration chkConfig, List<MasterTriggerRestoreHook<?>> masterHooks, CheckpointIDCounter checkpointIDCounter, CompletedCheckpointStore checkpointStore, StateBackend checkpointStateBackend, CheckpointStorage checkpointStorage, CheckpointStatsTracker statsTracker, CheckpointsCleaner checkpointsCleaner, String changelogStorageName)
enableCheckpointing 在接口中 ExecutionGraph@Nullable public CheckpointCoordinator getCheckpointCoordinator()
getCheckpointCoordinator 在接口中 ExecutionGraphpublic KvStateLocationRegistry getKvStateLocationRegistry()
getKvStateLocationRegistry 在接口中 ExecutionGraphpublic CheckpointCoordinatorConfiguration getCheckpointCoordinatorConfiguration()
AccessExecutionGraphCheckpointCoordinatorConfiguration or null if checkpointing
is disabled.getCheckpointCoordinatorConfiguration 在接口中 AccessExecutionGraphpublic CheckpointStatsSnapshot getCheckpointStatsSnapshot()
AccessExecutionGraphnull if checkpointing is
disabled.getCheckpointStatsSnapshot 在接口中 AccessExecutionGraphpublic void setJsonPlan(String jsonPlan)
setJsonPlan 在接口中 ExecutionGraphpublic String getJsonPlan()
AccessExecutionGraphgetJsonPlan 在接口中 AccessExecutionGraphpublic org.apache.flink.types.Either<org.apache.flink.util.SerializedValue<JobInformation>,PermanentBlobKey> getJobInformationOrBlobKey()
public org.apache.flink.api.common.JobID getJobID()
AccessExecutionGraphJobID for this execution graph.getJobID 在接口中 AccessExecutionGraphgetJobID 在接口中 InternalExecutionGraphAccessorpublic String getJobName()
AccessExecutionGraphgetJobName 在接口中 AccessExecutionGraphpublic boolean isStoppable()
AccessExecutionGraphisStoppable 在接口中 AccessExecutionGraphpublic org.apache.flink.configuration.Configuration getJobConfiguration()
getJobConfiguration 在接口中 ExecutionGraphpublic ClassLoader getUserClassLoader()
public org.apache.flink.api.common.JobStatus getState()
AccessExecutionGraphJobStatus for this execution graph.getState 在接口中 AccessExecutionGraphgetState 在接口中 JobStatusProviderpublic Throwable getFailureCause()
getFailureCause 在接口中 ExecutionGraphpublic ErrorInfo getFailureInfo()
AccessExecutionGraphgetFailureInfo 在接口中 AccessExecutionGraphpublic long getNumberOfRestarts()
ExecutionGraphgetNumberOfRestarts 在接口中 ExecutionGraphpublic int getNumFinishedVertices()
getNumFinishedVertices 在接口中 ExecutionGraphpublic ExecutionJobVertex getJobVertex(JobVertexID id)
AccessExecutionGraphJobVertexID.getJobVertex 在接口中 AccessExecutionGraphgetJobVertex 在接口中 ExecutionGraphgetJobVertex 在接口中 InternalExecutionGraphAccessorid - id of job vertex to be returnednullpublic Map<JobVertexID,ExecutionJobVertex> getAllVertices()
AccessExecutionGraphgetAllVertices 在接口中 AccessExecutionGraphgetAllVertices 在接口中 ExecutionGraphpublic Iterable<ExecutionJobVertex> getVerticesTopologically()
AccessExecutionGraphgetVerticesTopologically 在接口中 AccessExecutionGraphgetVerticesTopologically 在接口中 ExecutionGraphpublic Map<IntermediateDataSetID,IntermediateResult> getAllIntermediateResults()
getAllIntermediateResults 在接口中 ExecutionGraphpublic Iterable<ExecutionVertex> getAllExecutionVertices()
AccessExecutionGraphgetAllExecutionVertices 在接口中 AccessExecutionGraphgetAllExecutionVertices 在接口中 ExecutionGraphpublic EdgeManager getEdgeManager()
getEdgeManager 在接口中 InternalExecutionGraphAccessorpublic ExecutionVertex getExecutionVertexOrThrow(ExecutionVertexID id)
public IntermediateResultPartition getResultPartitionOrThrow(IntermediateResultPartitionID id)
public long getStatusTimestamp(org.apache.flink.api.common.JobStatus status)
AccessExecutionGraphJobStatus.getStatusTimestamp 在接口中 AccessExecutionGraphgetStatusTimestamp 在接口中 JobStatusProviderstatus - status for which the timestamp should be returnedpublic final BlobWriter getBlobWriter()
getBlobWriter 在接口中 InternalExecutionGraphAccessorpublic Executor getFutureExecutor()
InternalExecutionGraphAccessorgetFutureExecutor 在接口中 InternalExecutionGraphAccessorpublic Map<String,org.apache.flink.util.OptionalFailure<org.apache.flink.api.common.accumulators.Accumulator<?,?>>> aggregateUserAccumulators()
ExecutionGraphaggregateUserAccumulators 在接口中 ExecutionGraphpublic Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> getAccumulatorsSerialized()
getAccumulatorsSerialized 在接口中 AccessExecutionGraphpublic StringifiedAccumulatorResult[] getAccumulatorResultsStringified()
getAccumulatorResultsStringified 在接口中 AccessExecutionGraphpublic void setInternalTaskFailuresListener(InternalFailuresListener internalTaskFailuresListener)
public void notifyNewlyInitializedJobVertices(List<ExecutionJobVertex> vertices)
ExecutionGraphnotifyNewlyInitializedJobVertices 在接口中 ExecutionGraphvertices - The execution job vertices that are newly initialized.public void attachJobGraph(List<JobVertex> topologicallySorted) throws JobException
attachJobGraph 在接口中 ExecutionGraphJobExceptionpublic void initializeJobVertex(ExecutionJobVertex ejv, long createTimestamp) throws JobException
ExecutionGraphinitializeJobVertex 在接口中 ExecutionGraphejv - The execution job vertex that needs to be initialized.createTimestamp - The timestamp for creating execution vertices, used to initialize the
first Execution with.JobExceptionpublic void transitionToRunning()
transitionToRunning 在接口中 ExecutionGraphpublic void cancel()
cancel 在接口中 ExecutionGraph@VisibleForTesting protected org.apache.flink.util.concurrent.FutureUtils.ConjunctFuture<Void> cancelVerticesAsync()
public void suspend(Throwable suspensionCause)
ExecutionGraphThe JobStatus will be directly set to JobStatus.SUSPENDED iff the current state is
not a terminal state. All ExecutionJobVertices will be canceled and the onTerminalState() is
executed.
The JobStatus.SUSPENDED state is a local terminal state which stops the execution
of the job but does not remove the job from the HA job store so that it can be recovered by
another JobManager.
suspend 在接口中 ExecutionGraphsuspensionCause - Cause of the suspensionpublic void failGlobal(Throwable t)
InternalExecutionGraphAccessorThis global failure is meant to be triggered in cases where the consistency of the execution graph' state cannot be guaranteed any more (for example when catching unexpected exceptions that indicate a bug or an unexpected call race), and where a full restart is the safe way to get consistency back.
failGlobal 在接口中 InternalExecutionGraphAccessort - The exception that caused the failure.public org.apache.flink.api.common.ArchivedExecutionConfig getArchivedExecutionConfig()
ArchivedExecutionConfig.getArchivedExecutionConfig 在接口中 AccessExecutionGraphpublic CompletableFuture<org.apache.flink.api.common.JobStatus> getTerminationFuture()
ExecutionGraphExecutionGraph. The termination future is
completed with the terminal JobStatus once the ExecutionGraph reaches this terminal
state and all Execution have been terminated.getTerminationFuture 在接口中 ExecutionGraphExecutionGraph.@VisibleForTesting
public org.apache.flink.api.common.JobStatus waitUntilTerminal()
throws InterruptedException
waitUntilTerminal 在接口中 ExecutionGraphInterruptedExceptionpublic boolean transitionState(org.apache.flink.api.common.JobStatus current,
org.apache.flink.api.common.JobStatus newState)
transitionState 在接口中 ExecutionGraphpublic void incrementRestarts()
incrementRestarts 在接口中 ExecutionGraphpublic void initFailureCause(Throwable t, long timestamp)
initFailureCause 在接口中 ExecutionGraphpublic void jobVertexFinished()
public void jobVertexUnFinished()
public void failJob(Throwable cause, long timestamp)
failJob 在接口中 ExecutionGraphpublic boolean updateState(TaskExecutionStateTransition state)
ExecutionGraphupdateState 在接口中 ExecutionGraphstate - The state update.public Map<ExecutionAttemptID,Execution> getRegisteredExecutions()
getRegisteredExecutions 在接口中 ExecutionGraphpublic void registerExecution(Execution exec)
public void deregisterExecution(Execution exec)
public void updateAccumulators(AccumulatorSnapshot accumulatorSnapshot)
ExecutionGraphupdateAccumulators 在接口中 ExecutionGraphaccumulatorSnapshot - The serialized flink and user-defined accumulatorspublic void registerJobStatusListener(JobStatusListener listener)
registerJobStatusListener 在接口中 ExecutionGraphpublic void notifyExecutionChange(Execution execution, ExecutionState previousState, ExecutionState newExecutionState)
public void notifySchedulerNgAboutInternalTaskFailure(ExecutionAttemptID attemptId, Throwable t, boolean cancelTask, boolean releasePartitions)
public void deleteBlobs(List<PermanentBlobKey> blobKeys)
deleteBlobs 在接口中 InternalExecutionGraphAccessorpublic ShuffleMaster<?> getShuffleMaster()
public JobMasterPartitionTracker getPartitionTracker()
public ResultPartitionAvailabilityChecker getResultPartitionAvailabilityChecker()
public PartitionGroupReleaseStrategy getPartitionGroupReleaseStrategy()
public ExecutionDeploymentListener getExecutionDeploymentListener()
public boolean isDynamic()
isDynamic 在接口中 InternalExecutionGraphAccessorpublic Optional<String> findVertexWithAttempt(ExecutionAttemptID attemptId)
findVertexWithAttempt 在接口中 ExecutionGraphpublic Optional<AccessExecution> findExecution(ExecutionAttemptID attemptId)
findExecution 在接口中 ExecutionGraphpublic ExecutionGraphID getExecutionGraphID()
public List<ShuffleDescriptor> getClusterPartitionShuffleDescriptors(IntermediateDataSetID intermediateDataSetID)
InternalExecutionGraphAccessorCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.