Class ArchivedExecutionGraph
- java.lang.Object
-
- org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph
-
- All Implemented Interfaces:
Serializable,AccessExecutionGraph,JobStatusProvider
public class ArchivedExecutionGraph extends Object implements AccessExecutionGraph, Serializable
An archived execution graph represents a serializable form of anExecutionGraph.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArchivedExecutionGraph(org.apache.flink.api.common.JobID jobID, String jobName, Map<JobVertexID,ArchivedExecutionJobVertex> tasks, List<ArchivedExecutionJobVertex> verticesInCreationOrder, long[] stateTimestamps, org.apache.flink.api.common.JobStatus state, JobType jobType, ErrorInfo failureCause, String jsonPlan, StringifiedAccumulatorResult[] archivedUserAccumulators, Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> serializedUserAccumulators, org.apache.flink.api.common.ArchivedExecutionConfig executionConfig, boolean isStoppable, CheckpointCoordinatorConfiguration jobCheckpointingConfiguration, CheckpointStatsSnapshot checkpointStatsSnapshot, String stateBackendName, String checkpointStorageName, org.apache.flink.util.TernaryBoolean stateChangelogEnabled, String changelogStorageName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArchivedExecutionGraphcreateFrom(ExecutionGraph executionGraph)Create aArchivedExecutionGraphfrom the givenExecutionGraph.static ArchivedExecutionGraphcreateFrom(ExecutionGraph executionGraph, org.apache.flink.api.common.JobStatus statusOverride)Create aArchivedExecutionGraphfrom the givenExecutionGraph.static ArchivedExecutionGraphcreateSparseArchivedExecutionGraph(org.apache.flink.api.common.JobID jobId, String jobName, org.apache.flink.api.common.JobStatus jobStatus, JobType jobType, Throwable throwable, JobCheckpointingSettings checkpointingSettings, long initializationTimestamp)Create a sparse ArchivedExecutionGraph for a job.static ArchivedExecutionGraphcreateSparseArchivedExecutionGraphWithJobVertices(org.apache.flink.api.common.JobID jobId, String jobName, org.apache.flink.api.common.JobStatus jobStatus, JobType jobType, Throwable throwable, JobCheckpointingSettings checkpointingSettings, long initializationTimestamp, Iterable<JobVertex> jobVertices, VertexParallelismStore initialParallelismStore)StringifiedAccumulatorResult[]getAccumulatorResultsStringified()Returns the aggregated user-defined accumulators as strings.Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>>getAccumulatorsSerialized()Returns a map containing the serialized values of user-defined accumulators.Iterable<ArchivedExecutionVertex>getAllExecutionVertices()Returns an iterable containing all execution vertices for this execution graph.Map<JobVertexID,AccessExecutionJobVertex>getAllVertices()Returns a map containing all job vertices for this execution graph.org.apache.flink.api.common.ArchivedExecutionConfiggetArchivedExecutionConfig()Returns theArchivedExecutionConfigfor this execution graph.Optional<String>getChangelogStorageName()Returns the changelog storage name for this ExecutionGraph.CheckpointCoordinatorConfigurationgetCheckpointCoordinatorConfiguration()Returns theCheckpointCoordinatorConfigurationornullif checkpointing is disabled.CheckpointStatsSnapshotgetCheckpointStatsSnapshot()Returns a snapshot of the checkpoint statistics ornullif checkpointing is disabled.Optional<String>getCheckpointStorageName()Returns the checkpoint storage name for this ExecutionGraph.ErrorInfogetFailureInfo()Returns the exception that caused the job to fail.org.apache.flink.api.common.JobIDgetJobID()Returns theJobIDfor this execution graph.StringgetJobName()Returns the job name for the execution graph.JobTypegetJobType()Returns theJobTypefor this execution graph.ArchivedExecutionJobVertexgetJobVertex(JobVertexID id)Returns the job vertex for the givenJobVertexID.StringgetJsonPlan()Returns the job plan as a JSON string.org.apache.flink.api.common.JobStatusgetState()Returns the currentJobStatusfor this execution graph.Optional<String>getStateBackendName()Returns the state backend name for this ExecutionGraph.longgetStatusTimestamp(org.apache.flink.api.common.JobStatus status)Returns the timestamp for the givenJobStatus.Iterable<ArchivedExecutionJobVertex>getVerticesTopologically()Returns an iterable containing all job vertices for this execution graph in the order they were created.org.apache.flink.util.TernaryBooleanisChangelogStateBackendEnabled()Returns whether the state changelog is enabled for this ExecutionGraph.booleanisStoppable()Returns whether the job for this execution graph is stoppable.
-
-
-
Constructor Detail
-
ArchivedExecutionGraph
public ArchivedExecutionGraph(org.apache.flink.api.common.JobID jobID, String jobName, Map<JobVertexID,ArchivedExecutionJobVertex> tasks, List<ArchivedExecutionJobVertex> verticesInCreationOrder, long[] stateTimestamps, org.apache.flink.api.common.JobStatus state, @Nullable JobType jobType, @Nullable ErrorInfo failureCause, String jsonPlan, StringifiedAccumulatorResult[] archivedUserAccumulators, Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> serializedUserAccumulators, org.apache.flink.api.common.ArchivedExecutionConfig executionConfig, boolean isStoppable, @Nullable CheckpointCoordinatorConfiguration jobCheckpointingConfiguration, @Nullable CheckpointStatsSnapshot checkpointStatsSnapshot, @Nullable String stateBackendName, @Nullable String checkpointStorageName, @Nullable org.apache.flink.util.TernaryBoolean stateChangelogEnabled, @Nullable String changelogStorageName)
-
-
Method Detail
-
getJsonPlan
public String getJsonPlan()
Description copied from interface:AccessExecutionGraphReturns the job plan as a JSON string.- Specified by:
getJsonPlanin interfaceAccessExecutionGraph- Returns:
- job plan as a JSON string
-
getJobID
public org.apache.flink.api.common.JobID getJobID()
Description copied from interface:AccessExecutionGraphReturns theJobIDfor this execution graph.- Specified by:
getJobIDin interfaceAccessExecutionGraph- Returns:
- job ID for this execution graph
-
getJobName
public String getJobName()
Description copied from interface:AccessExecutionGraphReturns the job name for the execution graph.- Specified by:
getJobNamein interfaceAccessExecutionGraph- Returns:
- job name for this execution graph
-
getState
public org.apache.flink.api.common.JobStatus getState()
Description copied from interface:AccessExecutionGraphReturns the currentJobStatusfor this execution graph.- Specified by:
getStatein interfaceAccessExecutionGraph- Specified by:
getStatein interfaceJobStatusProvider- Returns:
- job status for this execution graph
-
getJobType
public JobType getJobType()
Description copied from interface:AccessExecutionGraphReturns theJobTypefor this execution graph.- Specified by:
getJobTypein interfaceAccessExecutionGraph- Returns:
- job type for this execution graph. It may be null when an exception occurs.
-
getFailureInfo
@Nullable public ErrorInfo getFailureInfo()
Description copied from interface:AccessExecutionGraphReturns the exception that caused the job to fail. This is the first root exception that was not recoverable and triggered job failure.- Specified by:
getFailureInfoin interfaceAccessExecutionGraph- Returns:
- failure causing exception, or null
-
getJobVertex
public ArchivedExecutionJobVertex getJobVertex(JobVertexID id)
Description copied from interface:AccessExecutionGraphReturns the job vertex for the givenJobVertexID.- Specified by:
getJobVertexin interfaceAccessExecutionGraph- Parameters:
id- id of job vertex to be returned- Returns:
- job vertex for the given id, or
null
-
getAllVertices
public Map<JobVertexID,AccessExecutionJobVertex> getAllVertices()
Description copied from interface:AccessExecutionGraphReturns a map containing all job vertices for this execution graph.- Specified by:
getAllVerticesin interfaceAccessExecutionGraph- Returns:
- map containing all job vertices for this execution graph
-
getVerticesTopologically
public Iterable<ArchivedExecutionJobVertex> getVerticesTopologically()
Description copied from interface:AccessExecutionGraphReturns an iterable containing all job vertices for this execution graph in the order they were created.- Specified by:
getVerticesTopologicallyin interfaceAccessExecutionGraph- Returns:
- iterable containing all job vertices for this execution graph in the order they were created
-
getAllExecutionVertices
public Iterable<ArchivedExecutionVertex> getAllExecutionVertices()
Description copied from interface:AccessExecutionGraphReturns an iterable containing all execution vertices for this execution graph.- Specified by:
getAllExecutionVerticesin interfaceAccessExecutionGraph- Returns:
- iterable containing all execution vertices for this execution graph
-
getStatusTimestamp
public long getStatusTimestamp(org.apache.flink.api.common.JobStatus status)
Description copied from interface:AccessExecutionGraphReturns the timestamp for the givenJobStatus.- Specified by:
getStatusTimestampin interfaceAccessExecutionGraph- Specified by:
getStatusTimestampin interfaceJobStatusProvider- Parameters:
status- status for which the timestamp should be returned- Returns:
- timestamp for the given job status
-
getCheckpointCoordinatorConfiguration
public CheckpointCoordinatorConfiguration getCheckpointCoordinatorConfiguration()
Description copied from interface:AccessExecutionGraphReturns theCheckpointCoordinatorConfigurationornullif checkpointing is disabled.- Specified by:
getCheckpointCoordinatorConfigurationin interfaceAccessExecutionGraph- Returns:
- JobCheckpointingConfiguration for this execution graph
-
getCheckpointStatsSnapshot
public CheckpointStatsSnapshot getCheckpointStatsSnapshot()
Description copied from interface:AccessExecutionGraphReturns a snapshot of the checkpoint statistics ornullif checkpointing is disabled.- Specified by:
getCheckpointStatsSnapshotin interfaceAccessExecutionGraph- Returns:
- Snapshot of the checkpoint statistics for this execution graph
-
getArchivedExecutionConfig
public org.apache.flink.api.common.ArchivedExecutionConfig getArchivedExecutionConfig()
Description copied from interface:AccessExecutionGraphReturns theArchivedExecutionConfigfor this execution graph.- Specified by:
getArchivedExecutionConfigin interfaceAccessExecutionGraph- Returns:
- execution config summary for this execution graph, or null in case of errors
-
isStoppable
public boolean isStoppable()
Description copied from interface:AccessExecutionGraphReturns whether the job for this execution graph is stoppable.- Specified by:
isStoppablein interfaceAccessExecutionGraph- Returns:
- true, if all sources tasks are stoppable, false otherwise
-
getAccumulatorResultsStringified
public StringifiedAccumulatorResult[] getAccumulatorResultsStringified()
Description copied from interface:AccessExecutionGraphReturns the aggregated user-defined accumulators as strings.- Specified by:
getAccumulatorResultsStringifiedin interfaceAccessExecutionGraph- Returns:
- aggregated user-defined accumulators as strings.
-
getAccumulatorsSerialized
public Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> getAccumulatorsSerialized()
Description copied from interface:AccessExecutionGraphReturns a map containing the serialized values of user-defined accumulators.- Specified by:
getAccumulatorsSerializedin interfaceAccessExecutionGraph- Returns:
- map containing serialized values of user-defined accumulators
-
getStateBackendName
public Optional<String> getStateBackendName()
Description copied from interface:AccessExecutionGraphReturns the state backend name for this ExecutionGraph.- Specified by:
getStateBackendNamein interfaceAccessExecutionGraph- Returns:
- The state backend name, or an empty Optional in the case of batch jobs
-
getCheckpointStorageName
public Optional<String> getCheckpointStorageName()
Description copied from interface:AccessExecutionGraphReturns the checkpoint storage name for this ExecutionGraph.- Specified by:
getCheckpointStorageNamein interfaceAccessExecutionGraph- Returns:
- The checkpoint storage name, or an empty Optional in the case of batch jobs
-
isChangelogStateBackendEnabled
public org.apache.flink.util.TernaryBoolean isChangelogStateBackendEnabled()
Description copied from interface:AccessExecutionGraphReturns whether the state changelog is enabled for this ExecutionGraph.- Specified by:
isChangelogStateBackendEnabledin interfaceAccessExecutionGraph- Returns:
- true, if state changelog enabled, false otherwise.
-
getChangelogStorageName
public Optional<String> getChangelogStorageName()
Description copied from interface:AccessExecutionGraphReturns the changelog storage name for this ExecutionGraph.- Specified by:
getChangelogStorageNamein interfaceAccessExecutionGraph- Returns:
- The changelog storage name, or an empty Optional in the case of batch jobs
-
createFrom
public static ArchivedExecutionGraph createFrom(ExecutionGraph executionGraph)
Create aArchivedExecutionGraphfrom the givenExecutionGraph.- Parameters:
executionGraph- to create the ArchivedExecutionGraph from- Returns:
- ArchivedExecutionGraph created from the given ExecutionGraph
-
createFrom
public static ArchivedExecutionGraph createFrom(ExecutionGraph executionGraph, @Nullable org.apache.flink.api.common.JobStatus statusOverride)
Create aArchivedExecutionGraphfrom the givenExecutionGraph.- Parameters:
executionGraph- to create the ArchivedExecutionGraph fromstatusOverride- optionally overrides the JobStatus of the ExecutionGraph with a non-globally-terminal state and clears timestamps of globally-terminal states- Returns:
- ArchivedExecutionGraph created from the given ExecutionGraph
-
createSparseArchivedExecutionGraph
public static ArchivedExecutionGraph createSparseArchivedExecutionGraph(org.apache.flink.api.common.JobID jobId, String jobName, org.apache.flink.api.common.JobStatus jobStatus, @Nullable JobType jobType, @Nullable Throwable throwable, @Nullable JobCheckpointingSettings checkpointingSettings, long initializationTimestamp)
Create a sparse ArchivedExecutionGraph for a job. Most fields will be empty, only job status and error-related fields are set.
-
createSparseArchivedExecutionGraphWithJobVertices
public static ArchivedExecutionGraph createSparseArchivedExecutionGraphWithJobVertices(org.apache.flink.api.common.JobID jobId, String jobName, org.apache.flink.api.common.JobStatus jobStatus, JobType jobType, @Nullable Throwable throwable, @Nullable JobCheckpointingSettings checkpointingSettings, long initializationTimestamp, Iterable<JobVertex> jobVertices, VertexParallelismStore initialParallelismStore)
-
-