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 its DistributionPattern.
See Also:
  • 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

      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.
    • 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.
    • getTypeNumber

      public int getTypeNumber()
      Gets typeNumber of the edge.
    • areInterInputsKeysCorrelated

      public boolean areInterInputsKeysCorrelated()
      Gets whether the records with same key of this edge are correlated with other inputs.
    • isIntraInputKeyCorrelated

      public boolean isIntraInputKeyCorrelated()
      Gets whether the records with same key of this edge are correlated.
    • toString

      public String toString()
      Overrides:
      toString in class Object