Class JobEdge
- java.lang.Object
-
- org.apache.flink.runtime.jobgraph.JobEdge
-
- All Implemented Interfaces:
Serializable
public class JobEdge extends Object implements Serializable
This class represent edges (communication channels) in a job graph. The edges always go from an intermediate result partition to a job vertex. An edge is parametrized with itsDistributionPattern
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JobEdge(IntermediateDataSet source, JobVertex target, DistributionPattern distributionPattern, boolean isBroadcast)
Constructs a new job edge, that connects an intermediate result to a consumer task.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DistributionPattern
getDistributionPattern()
Returns the distribution pattern used for this edge.SubtaskStateMapper
getDownstreamSubtaskStateMapper()
Gets the channel state rescaler used for rescaling persisted data on downstream side of this JobEdge.String
getOperatorLevelCachingDescription()
Gets the operator-level caching description for this input.String
getPreProcessingOperationName()
Gets the name of the pro-processing operation for this input.String
getShipStrategyName()
Gets the name of the ship strategy for the represented input, like "forward", "partition hash", "rebalance", "broadcast", ...IntermediateDataSet
getSource()
Returns the data set at the source of the edge.IntermediateDataSetID
getSourceId()
Gets the ID of the consumed data set.JobVertex
getTarget()
Returns the vertex connected to this edge.SubtaskStateMapper
getUpstreamSubtaskStateMapper()
Gets the channel state rescaler used for rescaling persisted data on upstream side of this JobEdge.boolean
isBroadcast()
Gets whether the edge is broadcast edge.boolean
isForward()
Gets whether the edge is forward edge.void
setDownstreamSubtaskStateMapper(SubtaskStateMapper downstreamSubtaskStateMapper)
Sets the channel state rescaler used for rescaling persisted data on downstream side of this JobEdge.void
setForward(boolean forward)
Sets whether the edge is forward edge.void
setOperatorLevelCachingDescription(String operatorLevelCachingDescription)
Sets the operator-level caching description for this input.void
setPreProcessingOperationName(String preProcessingOperationName)
Sets the name of the pre-processing operation for this input.void
setShipStrategyName(String shipStrategyName)
Sets the name of the ship strategy for the represented input.void
setUpstreamSubtaskStateMapper(SubtaskStateMapper upstreamSubtaskStateMapper)
Sets the channel state rescaler used for rescaling persisted data on upstream side of this JobEdge.String
toString()
-
-
-
Constructor Detail
-
JobEdge
public JobEdge(IntermediateDataSet source, JobVertex target, DistributionPattern distributionPattern, boolean isBroadcast)
Constructs a new job edge, that connects an intermediate result to a consumer task.- Parameters:
source
- The data set that is at the source of this edge.target
- The operation that is at the target of this edge.distributionPattern
- The pattern that defines how the connection behaves in parallel.isBroadcast
- Whether the source broadcasts data to the target.
-
-
Method Detail
-
getSource
public IntermediateDataSet getSource()
Returns the data set at the source of the edge. May be null, if the edge refers to the source via an ID and has not been connected.- Returns:
- The data set at the source of the edge
-
getTarget
public JobVertex getTarget()
Returns the vertex connected to this edge.- Returns:
- The vertex connected to this edge.
-
getDistributionPattern
public DistributionPattern getDistributionPattern()
Returns the distribution pattern used for this edge.- Returns:
- The distribution pattern used for this edge.
-
getSourceId
public IntermediateDataSetID getSourceId()
Gets the ID of the consumed data set.- Returns:
- The ID of the consumed data set.
-
getShipStrategyName
public String getShipStrategyName()
Gets the name of the ship strategy for the represented input, like "forward", "partition hash", "rebalance", "broadcast", ...- Returns:
- The name of the ship strategy for the represented input, or null, if none was set.
-
setShipStrategyName
public void setShipStrategyName(String shipStrategyName)
Sets the name of the ship strategy for the represented input.- Parameters:
shipStrategyName
- The name of the ship strategy.
-
isBroadcast
public boolean isBroadcast()
Gets whether the edge is broadcast edge.
-
isForward
public boolean isForward()
Gets whether the edge is forward edge.
-
setForward
public void setForward(boolean forward)
Sets whether the edge is forward edge.
-
getDownstreamSubtaskStateMapper
public SubtaskStateMapper getDownstreamSubtaskStateMapper()
Gets the channel state rescaler used for rescaling persisted data on downstream side of this JobEdge.- Returns:
- The channel state rescaler to use, or null, if none was set.
-
setDownstreamSubtaskStateMapper
public void setDownstreamSubtaskStateMapper(SubtaskStateMapper downstreamSubtaskStateMapper)
Sets the channel state rescaler used for rescaling persisted data on downstream side of this JobEdge.- Parameters:
downstreamSubtaskStateMapper
- The channel state rescaler selector to use.
-
getUpstreamSubtaskStateMapper
public SubtaskStateMapper getUpstreamSubtaskStateMapper()
Gets the channel state rescaler used for rescaling persisted data on upstream side of this JobEdge.- Returns:
- The channel state rescaler to use, or null, if none was set.
-
setUpstreamSubtaskStateMapper
public void setUpstreamSubtaskStateMapper(SubtaskStateMapper upstreamSubtaskStateMapper)
Sets the channel state rescaler used for rescaling persisted data on upstream side of this JobEdge.- Parameters:
upstreamSubtaskStateMapper
- The channel state rescaler selector to use.
-
getPreProcessingOperationName
public String getPreProcessingOperationName()
Gets the name of the pro-processing operation for this input.- Returns:
- The name of the pro-processing operation, or null, if none was set.
-
setPreProcessingOperationName
public void setPreProcessingOperationName(String preProcessingOperationName)
Sets the name of the pre-processing operation for this input.- Parameters:
preProcessingOperationName
- The name of the pre-processing operation.
-
getOperatorLevelCachingDescription
public String getOperatorLevelCachingDescription()
Gets the operator-level caching description for this input.- Returns:
- The description of operator-level caching, or null, is none was set.
-
setOperatorLevelCachingDescription
public void setOperatorLevelCachingDescription(String operatorLevelCachingDescription)
Sets the operator-level caching description for this input.- Parameters:
operatorLevelCachingDescription
- The description of operator-level caching.
-
-