Class JobEdge
java.lang.Object
org.apache.flink.runtime.jobgraph.JobEdge
- All Implemented Interfaces:
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 its
DistributionPattern.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJobEdge(IntermediateDataSet source, JobVertex target, DistributionPattern distributionPattern, boolean isBroadcast, boolean isForward, int typeNumber, boolean interInputsKeysCorrelated, boolean intraInputKeyCorrelated) Constructs a new job edge, that connects an intermediate result to a consumer task. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets whether the records with same key of this edge are correlated with other inputs.Returns the distribution pattern used for this edge.Gets the channel state rescaler used for rescaling persisted data on downstream side of this JobEdge.Gets the operator-level caching description for this input.Gets the name of the pro-processing operation for this input.Gets the name of the ship strategy for the represented input, like "forward", "partition hash", "rebalance", "broadcast", ...Returns the data set at the source of the edge.Gets the ID of the consumed data set.Returns the vertex connected to this edge.intGets typeNumber of the edge.Gets the channel state rescaler used for rescaling persisted data on upstream side of this JobEdge.booleanGets whether the edge is broadcast edge.booleanGets whether the edge is forward edge.booleanGets whether the records with same key of this edge are correlated.voidsetDownstreamSubtaskStateMapper(SubtaskStateMapper downstreamSubtaskStateMapper) Sets the channel state rescaler used for rescaling persisted data on downstream side of this JobEdge.voidsetOperatorLevelCachingDescription(String operatorLevelCachingDescription) Sets the operator-level caching description for this input.voidsetPreProcessingOperationName(String preProcessingOperationName) Sets the name of the pre-processing operation for this input.voidsetShipStrategyName(String shipStrategyName) Sets the name of the ship strategy for the represented input.voidsetUpstreamSubtaskStateMapper(SubtaskStateMapper upstreamSubtaskStateMapper) Sets the channel state rescaler used for rescaling persisted data on upstream side of this JobEdge.toString()
-
Constructor Details
-
JobEdge
public JobEdge(IntermediateDataSet source, JobVertex target, DistributionPattern distributionPattern, boolean isBroadcast, boolean isForward, int typeNumber, boolean interInputsKeysCorrelated, boolean intraInputKeyCorrelated) 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 Details
-
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
Returns the vertex connected to this edge.- Returns:
- The vertex connected to this edge.
-
getDistributionPattern
Returns the distribution pattern used for this edge.- Returns:
- The distribution pattern used for this edge.
-
getSourceId
Gets the ID of the consumed data set.- Returns:
- The ID of the consumed data set.
-
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
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. -
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
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
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
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
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
Sets the name of the pre-processing operation for this input.- Parameters:
preProcessingOperationName- The name of the pre-processing operation.
-
getOperatorLevelCachingDescription
Gets the operator-level caching description for this input.- Returns:
- The description of operator-level caching, or null, is none was set.
-
setOperatorLevelCachingDescription
Sets the operator-level caching description for this input.- Parameters:
operatorLevelCachingDescription- The description of operator-level caching.
-
getTypeNumber
public int getTypeNumber()Gets typeNumber of the edge. -
toString
-