Class StreamGraph
- java.lang.Object
-
- org.apache.flink.streaming.api.graph.StreamGraph
-
- All Implemented Interfaces:
Serializable
,Pipeline
,ExecutionPlan
@Internal public class StreamGraph extends Object implements Pipeline, ExecutionPlan
Class representing the streaming topology. It contains all the information necessary to build the jobgraph for the execution.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Integer,String>
vertexIDtoBrokerID
protected Map<Integer,Long>
vertexIDtoLoopTimeout
-
Constructor Summary
Constructors Constructor Description StreamGraph(Configuration jobConfiguration, ExecutionConfig executionConfig, CheckpointConfig checkpointConfig, SavepointRestoreSettings savepointRestoreSettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <IN1,IN2,OUT>
voidaddCoOperator(Integer vertexID, String slotSharingGroup, String coLocationGroup, StreamOperatorFactory<OUT> taskOperatorFactory, TypeInformation<IN1> in1TypeInfo, TypeInformation<IN2> in2TypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
void
addEdge(Integer upStreamVertexID, Integer downStreamVertexID, int typeNumber)
void
addEdge(Integer upStreamVertexID, Integer downStreamVertexID, int typeNumber, IntermediateDataSetID intermediateDataSetId)
void
addJar(Path jar)
Adds the path of a JAR file required to run the job on a task manager.void
addJars(List<URL> jarFilesToAttach)
Adds the given jar files to theJobGraph
viaJobGraph.addJar(org.apache.flink.core.fs.Path)
.<IN,OUT>
voidaddLegacySource(Integer vertexID, String slotSharingGroup, String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
<OUT> void
addMultipleInputOperator(Integer vertexID, String slotSharingGroup, String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, List<TypeInformation<?>> inTypeInfos, TypeInformation<OUT> outTypeInfo, String operatorName)
protected StreamNode
addNode(Integer vertexID, String slotSharingGroup, String coLocationGroup, Class<? extends TaskInvokable> vertexClass, StreamOperatorFactory<?> operatorFactory, String operatorName)
<IN,OUT>
voidaddOperator(Integer vertexID, String slotSharingGroup, String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
<IN,OUT>
voidaddSink(Integer vertexID, String slotSharingGroup, String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
<IN,OUT>
voidaddSource(Integer vertexID, String slotSharingGroup, String coLocationGroup, SourceOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
void
addUserArtifact(String name, DistributedCache.DistributedCacheEntry file)
void
addUserJarBlobKey(PermanentBlobKey key)
Adds a blob key corresponding to a user JAR.void
addVirtualPartitionNode(Integer originalId, Integer virtualId, StreamPartitioner<?> partitioner, StreamExchangeMode exchangeMode)
Adds a new virtual node that is used to connect a downstream vertex to an input with a certain partitioning.void
addVirtualSideOutputNode(Integer originalId, Integer virtualId, OutputTag outputTag)
Adds a new virtual node that is used to connect a downstream vertex to only the outputs with the selected side-outputOutputTag
.void
clear()
Remove all registered nodes etc.void
createJobCheckpointingSettings()
void
deserializeUserDefinedInstances(ClassLoader userClassLoader, Executor serializationExecutor)
String
getBrokerID(Integer vertexID)
CheckpointConfig
getCheckpointConfig()
CheckpointingMode
getCheckpointingMode()
static CheckpointingMode
getCheckpointingMode(CheckpointConfig checkpointConfig)
JobCheckpointingSettings
getCheckpointingSettings()
Gets the settings for job checkpointing.List<URL>
getClasspath()
List<URL>
getClasspaths()
Gets the classpath required for the job.ExecutionConfig
getExecutionConfig()
GlobalStreamExchangeMode
getGlobalStreamExchangeMode()
long
getInitialClientHeartbeatTimeout()
Gets the initial client heartbeat timeout.Configuration
getJobConfiguration()
Gets the job configuration.JobGraph
getJobGraph()
JobGraph
getJobGraph(ClassLoader userClassLoader)
JobGraph
getJobGraph(ClassLoader userClassLoader, JobID jobID)
JobID
getJobID()
Gets the unique identifier of the job.String
getJobName()
List<JobStatusHook>
getJobStatusHooks()
JobType
getJobType()
Gets the type of the job.LineageGraph
getLineageGraph()
long
getLoopTimeout(Integer vertexID)
int
getMaximumParallelism()
Gets the maximum parallelism level for the job.String
getName()
Gets the name of the job.SavepointRestoreSettings
getSavepointRestoreSettings()
Gets the settings for restoring from a savepoint.SerializedValue<ExecutionConfig>
getSerializedExecutionConfig()
Gets the serialized execution configuration.Collection<Integer>
getSinkIDs()
String
getSlotSharingGroup(Integer id)
Determines the slot sharing group of an operation across virtual nodes.Optional<ResourceProfile>
getSlotSharingGroupResource(String groupId)
Collection<Integer>
getSourceIDs()
StreamNode
getSourceVertex(StreamEdge edge)
StateBackend
getStateBackend()
List<StreamEdge>
getStreamEdges(int sourceId)
List<StreamEdge>
getStreamEdges(int sourceId, int targetId)
List<StreamEdge>
getStreamEdgesOrThrow(int sourceId, int targetId)
Deprecated.String
getStreamingPlanAsJSON()
StreamNode
getStreamNode(Integer vertexID)
Collection<StreamNode>
getStreamNodes()
StreamNode
getTargetVertex(StreamEdge edge)
InternalTimeServiceManager.Provider
getTimerServiceProvider()
Map<String,DistributedCache.DistributedCacheEntry>
getUserArtifacts()
Gets the user artifacts associated with the job.List<PermanentBlobKey>
getUserJarBlobKeys()
Returns a list of BLOB keys referring to the JAR files required to run this job.List<Path>
getUserJars()
Gets the list of assigned user jar paths.PipelineOptions.VertexDescriptionMode
getVertexDescriptionMode()
protected Collection<? extends Integer>
getVertexIDs()
boolean
hasFineGrainedResource()
boolean
isAllVerticesInSameSlotSharingGroupByDefault()
Gets whether to put all vertices into the same slot sharing group by default.boolean
isAutoParallelismEnabled()
boolean
isChainingEnabled()
boolean
isChainingOfOperatorsWithDifferentMaxParallelismEnabled()
boolean
isDynamic()
Checks if the execution plan is dynamic.boolean
isEmpty()
Checks if the execution plan is empty.boolean
isEnableCheckpointsAfterTasksFinish()
boolean
isIterative()
boolean
isPartialResourceConfigured()
Checks if partial resource configuration is specified.boolean
isVertexNameIncludeIndexPrefix()
void
registerJobStatusHook(JobStatusHook hook)
Registers the JobStatusHook.void
serializeUserDefinedInstances()
void
setAllVerticesInSameSlotSharingGroupByDefault(boolean allVerticesInSameSlotSharingGroupByDefault)
Set whether to put all vertices into the same slot sharing group by default.void
setAttribute(Integer vertexId, Attribute attribute)
void
setAutoParallelismEnabled(boolean autoParallelismEnabled)
void
setBufferTimeout(Integer vertexID, long bufferTimeout)
void
setCheckpointStorage(CheckpointStorage checkpointStorage)
void
setClasspath(List<URL> paths)
Sets the classpath required to run the job on a task manager.void
setDynamic(boolean dynamic)
void
setEnableCheckpointsAfterTasksFinish(boolean enableCheckpointsAfterTasksFinish)
void
setGlobalStreamExchangeMode(GlobalStreamExchangeMode globalExchangeMode)
void
setInitialClientHeartbeatTimeout(long initialClientHeartbeatTimeout)
void
setInputFormat(Integer vertexID, InputFormat<?,?> inputFormat)
void
setJobId(JobID jobId)
void
setJobName(String jobName)
void
setJobType(JobType jobType)
void
setLineageGraph(LineageGraph lineageGraph)
void
setManagedMemoryUseCaseWeights(int vertexID, Map<ManagedMemoryUseCase,Integer> operatorScopeUseCaseWeights, Set<ManagedMemoryUseCase> slotScopeUseCases)
void
setMaxParallelism(int vertexID, int maxParallelism)
void
setMultipleInputStateKey(Integer vertexID, List<KeySelector<?,?>> keySelectors, TypeSerializer<?> keySerializer)
void
setOneInputStateKey(Integer vertexID, KeySelector<?,?> keySelector, TypeSerializer<?> keySerializer)
void
setOutputFormat(Integer vertexID, OutputFormat<?> outputFormat)
void
setParallelism(Integer vertexID, int parallelism)
void
setParallelism(Integer vertexId, int parallelism, boolean parallelismConfigured)
void
setResources(int vertexID, ResourceSpec minResources, ResourceSpec preferredResources)
void
setSavepointRestoreSettings(SavepointRestoreSettings savepointRestoreSettings)
Sets the settings for restoring from a savepoint.void
setSerializers(Integer vertexID, TypeSerializer<?> in1, TypeSerializer<?> in2, TypeSerializer<?> out)
void
setSlotSharingGroupResource(Map<String,ResourceProfile> slotSharingGroupResources)
void
setStateBackend(StateBackend backend)
void
setSupportsConcurrentExecutionAttempts(Integer vertexId, boolean supportsConcurrentExecutionAttempts)
void
setTimerServiceProvider(InternalTimeServiceManager.Provider timerServiceProvider)
void
setTransformationUID(Integer nodeId, String transformationId)
void
setTwoInputStateKey(Integer vertexID, KeySelector<?,?> keySelector1, KeySelector<?,?> keySelector2, TypeSerializer<?> keySerializer)
void
setUserArtifactBlobKey(String entryName, PermanentBlobKey blobKey)
Sets a user artifact blob key for a specified user artifact.void
setVertexDescriptionMode(PipelineOptions.VertexDescriptionMode mode)
void
setVertexNameIncludeIndexPrefix(boolean includePrefix)
String
toString()
void
writeUserArtifactEntriesToConfiguration()
Writes user artifact entries to the job configuration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.streaming.api.graph.ExecutionPlan
isCheckpointingEnabled
-
-
-
-
Constructor Detail
-
StreamGraph
public StreamGraph(Configuration jobConfiguration, ExecutionConfig executionConfig, CheckpointConfig checkpointConfig, SavepointRestoreSettings savepointRestoreSettings)
-
-
Method Detail
-
clear
public void clear()
Remove all registered nodes etc.
-
getExecutionConfig
public ExecutionConfig getExecutionConfig()
-
getJobConfiguration
public Configuration getJobConfiguration()
Description copied from interface:ExecutionPlan
Gets the job configuration.- Specified by:
getJobConfiguration
in interfaceExecutionPlan
- Returns:
- the job configuration
-
getCheckpointConfig
public CheckpointConfig getCheckpointConfig()
-
getCheckpointingMode
public CheckpointingMode getCheckpointingMode()
-
getCheckpointingMode
public static CheckpointingMode getCheckpointingMode(CheckpointConfig checkpointConfig)
-
addJar
public void addJar(Path jar)
Adds the path of a JAR file required to run the job on a task manager.- Parameters:
jar
- path of the JAR file required to run the job on a task manager
-
getUserJars
public List<Path> getUserJars()
Gets the list of assigned user jar paths.- Specified by:
getUserJars
in interfaceExecutionPlan
- Returns:
- The list of assigned user jar paths
-
createJobCheckpointingSettings
public void createJobCheckpointingSettings()
-
setSavepointRestoreSettings
public void setSavepointRestoreSettings(SavepointRestoreSettings savepointRestoreSettings)
Description copied from interface:ExecutionPlan
Sets the settings for restoring from a savepoint.- Specified by:
setSavepointRestoreSettings
in interfaceExecutionPlan
- Parameters:
savepointRestoreSettings
- the settings for savepoint restoration
-
getSerializedExecutionConfig
public SerializedValue<ExecutionConfig> getSerializedExecutionConfig()
Description copied from interface:ExecutionPlan
Gets the serialized execution configuration.- Specified by:
getSerializedExecutionConfig
in interfaceExecutionPlan
- Returns:
- The serialized execution configuration object
-
getSavepointRestoreSettings
public SavepointRestoreSettings getSavepointRestoreSettings()
Description copied from interface:ExecutionPlan
Gets the settings for restoring from a savepoint.- Specified by:
getSavepointRestoreSettings
in interfaceExecutionPlan
- Returns:
- the savepoint restore settings
-
getJobName
public String getJobName()
-
setJobName
public void setJobName(String jobName)
-
getLineageGraph
public LineageGraph getLineageGraph()
-
setLineageGraph
public void setLineageGraph(LineageGraph lineageGraph)
-
setStateBackend
public void setStateBackend(StateBackend backend)
-
getStateBackend
@VisibleForTesting public StateBackend getStateBackend()
-
setCheckpointStorage
public void setCheckpointStorage(CheckpointStorage checkpointStorage)
-
getTimerServiceProvider
public InternalTimeServiceManager.Provider getTimerServiceProvider()
-
setTimerServiceProvider
public void setTimerServiceProvider(InternalTimeServiceManager.Provider timerServiceProvider)
-
getGlobalStreamExchangeMode
public GlobalStreamExchangeMode getGlobalStreamExchangeMode()
-
setGlobalStreamExchangeMode
public void setGlobalStreamExchangeMode(GlobalStreamExchangeMode globalExchangeMode)
-
setSlotSharingGroupResource
public void setSlotSharingGroupResource(Map<String,ResourceProfile> slotSharingGroupResources)
-
getSlotSharingGroupResource
public Optional<ResourceProfile> getSlotSharingGroupResource(String groupId)
-
hasFineGrainedResource
public boolean hasFineGrainedResource()
-
setAllVerticesInSameSlotSharingGroupByDefault
public void setAllVerticesInSameSlotSharingGroupByDefault(boolean allVerticesInSameSlotSharingGroupByDefault)
Set whether to put all vertices into the same slot sharing group by default.- Parameters:
allVerticesInSameSlotSharingGroupByDefault
- indicates whether to put all vertices into the same slot sharing group by default.
-
isAllVerticesInSameSlotSharingGroupByDefault
public boolean isAllVerticesInSameSlotSharingGroupByDefault()
Gets whether to put all vertices into the same slot sharing group by default.- Returns:
- whether to put all vertices into the same slot sharing group by default.
-
isEnableCheckpointsAfterTasksFinish
public boolean isEnableCheckpointsAfterTasksFinish()
-
setEnableCheckpointsAfterTasksFinish
public void setEnableCheckpointsAfterTasksFinish(boolean enableCheckpointsAfterTasksFinish)
-
isChainingEnabled
public boolean isChainingEnabled()
-
isChainingOfOperatorsWithDifferentMaxParallelismEnabled
public boolean isChainingOfOperatorsWithDifferentMaxParallelismEnabled()
-
isIterative
public boolean isIterative()
-
addSource
public <IN,OUT> void addSource(Integer vertexID, @Nullable String slotSharingGroup, @Nullable String coLocationGroup, SourceOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
-
addLegacySource
public <IN,OUT> void addLegacySource(Integer vertexID, @Nullable String slotSharingGroup, @Nullable String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
-
addSink
public <IN,OUT> void addSink(Integer vertexID, @Nullable String slotSharingGroup, @Nullable String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
-
addOperator
public <IN,OUT> void addOperator(Integer vertexID, @Nullable String slotSharingGroup, @Nullable String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, TypeInformation<IN> inTypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
-
addCoOperator
public <IN1,IN2,OUT> void addCoOperator(Integer vertexID, String slotSharingGroup, @Nullable String coLocationGroup, StreamOperatorFactory<OUT> taskOperatorFactory, TypeInformation<IN1> in1TypeInfo, TypeInformation<IN2> in2TypeInfo, TypeInformation<OUT> outTypeInfo, String operatorName)
-
addMultipleInputOperator
public <OUT> void addMultipleInputOperator(Integer vertexID, String slotSharingGroup, @Nullable String coLocationGroup, StreamOperatorFactory<OUT> operatorFactory, List<TypeInformation<?>> inTypeInfos, TypeInformation<OUT> outTypeInfo, String operatorName)
-
addNode
protected StreamNode addNode(Integer vertexID, @Nullable String slotSharingGroup, @Nullable String coLocationGroup, Class<? extends TaskInvokable> vertexClass, @Nullable StreamOperatorFactory<?> operatorFactory, String operatorName)
-
addVirtualSideOutputNode
public void addVirtualSideOutputNode(Integer originalId, Integer virtualId, OutputTag outputTag)
Adds a new virtual node that is used to connect a downstream vertex to only the outputs with the selected side-outputOutputTag
.- Parameters:
originalId
- ID of the node that should be connected to.virtualId
- ID of the virtual node.outputTag
- The selected side-outputOutputTag
.
-
addVirtualPartitionNode
public void addVirtualPartitionNode(Integer originalId, Integer virtualId, StreamPartitioner<?> partitioner, StreamExchangeMode exchangeMode)
Adds a new virtual node that is used to connect a downstream vertex to an input with a certain partitioning.When adding an edge from the virtual node to a downstream node the connection will be made to the original node, but with the partitioning given here.
- Parameters:
originalId
- ID of the node that should be connected to.virtualId
- ID of the virtual node.partitioner
- The partitioner
-
getSlotSharingGroup
public String getSlotSharingGroup(Integer id)
Determines the slot sharing group of an operation across virtual nodes.
-
addEdge
public void addEdge(Integer upStreamVertexID, Integer downStreamVertexID, int typeNumber, IntermediateDataSetID intermediateDataSetId)
-
setParallelism
public void setParallelism(Integer vertexID, int parallelism)
-
isDynamic
public boolean isDynamic()
Description copied from interface:ExecutionPlan
Checks if the execution plan is dynamic.- Specified by:
isDynamic
in interfaceExecutionPlan
- Returns:
- true if the execution plan is dynamic; false otherwise
-
getCheckpointingSettings
public JobCheckpointingSettings getCheckpointingSettings()
Description copied from interface:ExecutionPlan
Gets the settings for job checkpointing.- Specified by:
getCheckpointingSettings
in interfaceExecutionPlan
- Returns:
- the checkpointing settings
-
isEmpty
public boolean isEmpty()
Description copied from interface:ExecutionPlan
Checks if the execution plan is empty.- Specified by:
isEmpty
in interfaceExecutionPlan
- Returns:
- true if the plan is empty; false otherwise
-
setParallelism
public void setParallelism(Integer vertexId, int parallelism, boolean parallelismConfigured)
-
setDynamic
public void setDynamic(boolean dynamic)
-
setMaxParallelism
public void setMaxParallelism(int vertexID, int maxParallelism)
-
setResources
public void setResources(int vertexID, ResourceSpec minResources, ResourceSpec preferredResources)
-
setManagedMemoryUseCaseWeights
public void setManagedMemoryUseCaseWeights(int vertexID, Map<ManagedMemoryUseCase,Integer> operatorScopeUseCaseWeights, Set<ManagedMemoryUseCase> slotScopeUseCases)
-
setOneInputStateKey
public void setOneInputStateKey(Integer vertexID, KeySelector<?,?> keySelector, TypeSerializer<?> keySerializer)
-
setTwoInputStateKey
public void setTwoInputStateKey(Integer vertexID, KeySelector<?,?> keySelector1, KeySelector<?,?> keySelector2, TypeSerializer<?> keySerializer)
-
setMultipleInputStateKey
public void setMultipleInputStateKey(Integer vertexID, List<KeySelector<?,?>> keySelectors, TypeSerializer<?> keySerializer)
-
setBufferTimeout
public void setBufferTimeout(Integer vertexID, long bufferTimeout)
-
setSerializers
public void setSerializers(Integer vertexID, TypeSerializer<?> in1, TypeSerializer<?> in2, TypeSerializer<?> out)
-
setInputFormat
public void setInputFormat(Integer vertexID, InputFormat<?,?> inputFormat)
-
setOutputFormat
public void setOutputFormat(Integer vertexID, OutputFormat<?> outputFormat)
-
getStreamNode
public StreamNode getStreamNode(Integer vertexID)
-
getVertexIDs
protected Collection<? extends Integer> getVertexIDs()
-
getStreamEdges
@VisibleForTesting public List<StreamEdge> getStreamEdges(int sourceId)
-
getStreamEdges
@VisibleForTesting public List<StreamEdge> getStreamEdges(int sourceId, int targetId)
-
getStreamEdgesOrThrow
@VisibleForTesting @Deprecated public List<StreamEdge> getStreamEdgesOrThrow(int sourceId, int targetId)
Deprecated.
-
getSourceIDs
public Collection<Integer> getSourceIDs()
-
getSinkIDs
public Collection<Integer> getSinkIDs()
-
getStreamNodes
public Collection<StreamNode> getStreamNodes()
-
getLoopTimeout
public long getLoopTimeout(Integer vertexID)
-
getSourceVertex
public StreamNode getSourceVertex(StreamEdge edge)
-
getTargetVertex
public StreamNode getTargetVertex(StreamEdge edge)
-
getJobGraph
@VisibleForTesting public JobGraph getJobGraph()
-
getJobGraph
public JobGraph getJobGraph(ClassLoader userClassLoader)
-
getJobGraph
public JobGraph getJobGraph(ClassLoader userClassLoader, @Nullable JobID jobID)
-
getStreamingPlanAsJSON
public String getStreamingPlanAsJSON()
-
setJobType
public void setJobType(JobType jobType)
-
getName
public String getName()
Description copied from interface:ExecutionPlan
Gets the name of the job.- Specified by:
getName
in interfaceExecutionPlan
- Returns:
- the job name
-
getJobType
public JobType getJobType()
Description copied from interface:ExecutionPlan
Gets the type of the job.- Specified by:
getJobType
in interfaceExecutionPlan
- Returns:
- the job type
-
isAutoParallelismEnabled
public boolean isAutoParallelismEnabled()
-
setAutoParallelismEnabled
public void setAutoParallelismEnabled(boolean autoParallelismEnabled)
-
getVertexDescriptionMode
public PipelineOptions.VertexDescriptionMode getVertexDescriptionMode()
-
setVertexDescriptionMode
public void setVertexDescriptionMode(PipelineOptions.VertexDescriptionMode mode)
-
setVertexNameIncludeIndexPrefix
public void setVertexNameIncludeIndexPrefix(boolean includePrefix)
-
isVertexNameIncludeIndexPrefix
public boolean isVertexNameIncludeIndexPrefix()
-
registerJobStatusHook
public void registerJobStatusHook(JobStatusHook hook)
Registers the JobStatusHook.
-
getJobStatusHooks
public List<JobStatusHook> getJobStatusHooks()
-
setSupportsConcurrentExecutionAttempts
public void setSupportsConcurrentExecutionAttempts(Integer vertexId, boolean supportsConcurrentExecutionAttempts)
-
setJobId
public void setJobId(JobID jobId)
-
getJobID
public JobID getJobID()
Description copied from interface:ExecutionPlan
Gets the unique identifier of the job.- Specified by:
getJobID
in interfaceExecutionPlan
- Returns:
- the job id
-
setClasspath
public void setClasspath(List<URL> paths)
Sets the classpath required to run the job on a task manager.- Parameters:
paths
- paths of the directories/JAR files required to run the job on a task manager
-
addJars
public void addJars(List<URL> jarFilesToAttach)
Adds the given jar files to theJobGraph
viaJobGraph.addJar(org.apache.flink.core.fs.Path)
.- Parameters:
jarFilesToAttach
- a list of theURLs
of the jar files to attach to the jobgraph.- Throws:
RuntimeException
- if a jar URL is not valid.
-
getUserJarBlobKeys
public List<PermanentBlobKey> getUserJarBlobKeys()
Returns a list of BLOB keys referring to the JAR files required to run this job.- Specified by:
getUserJarBlobKeys
in interfaceExecutionPlan
- Returns:
- list of BLOB keys referring to the JAR files required to run this job
-
getClasspaths
public List<URL> getClasspaths()
Description copied from interface:ExecutionPlan
Gets the classpath required for the job.- Specified by:
getClasspaths
in interfaceExecutionPlan
- Returns:
- a list of classpath URLs
-
addUserArtifact
public void addUserArtifact(String name, DistributedCache.DistributedCacheEntry file)
-
getUserArtifacts
public Map<String,DistributedCache.DistributedCacheEntry> getUserArtifacts()
Description copied from interface:ExecutionPlan
Gets the user artifacts associated with the job.- Specified by:
getUserArtifacts
in interfaceExecutionPlan
- Returns:
- a map of user artifacts
-
addUserJarBlobKey
public void addUserJarBlobKey(PermanentBlobKey key)
Description copied from interface:ExecutionPlan
Adds a blob key corresponding to a user JAR.- Specified by:
addUserJarBlobKey
in interfaceExecutionPlan
- Parameters:
key
- the blob key to add
-
setUserArtifactBlobKey
public void setUserArtifactBlobKey(String entryName, PermanentBlobKey blobKey) throws IOException
Description copied from interface:ExecutionPlan
Sets a user artifact blob key for a specified user artifact.- Specified by:
setUserArtifactBlobKey
in interfaceExecutionPlan
- Parameters:
entryName
- the name of the user artifactblobKey
- the blob key corresponding to the user artifact- Throws:
IOException
- if an error occurs during the operation
-
writeUserArtifactEntriesToConfiguration
public void writeUserArtifactEntriesToConfiguration()
Description copied from interface:ExecutionPlan
Writes user artifact entries to the job configuration.- Specified by:
writeUserArtifactEntriesToConfiguration
in interfaceExecutionPlan
-
getMaximumParallelism
public int getMaximumParallelism()
Description copied from interface:ExecutionPlan
Gets the maximum parallelism level for the job.- Specified by:
getMaximumParallelism
in interfaceExecutionPlan
- Returns:
- the maximum parallelism
-
setInitialClientHeartbeatTimeout
public void setInitialClientHeartbeatTimeout(long initialClientHeartbeatTimeout)
-
getInitialClientHeartbeatTimeout
public long getInitialClientHeartbeatTimeout()
Description copied from interface:ExecutionPlan
Gets the initial client heartbeat timeout.- Specified by:
getInitialClientHeartbeatTimeout
in interfaceExecutionPlan
- Returns:
- the timeout duration in milliseconds
-
isPartialResourceConfigured
public boolean isPartialResourceConfigured()
Description copied from interface:ExecutionPlan
Checks if partial resource configuration is specified.- Specified by:
isPartialResourceConfigured
in interfaceExecutionPlan
- Returns:
- true if partial resource configuration is set; false otherwise
-
serializeUserDefinedInstances
public void serializeUserDefinedInstances() throws IOException
- Throws:
IOException
-
deserializeUserDefinedInstances
public void deserializeUserDefinedInstances(ClassLoader userClassLoader, Executor serializationExecutor) throws Exception
- Throws:
Exception
-
-