Class BlockingInputInfo

java.lang.Object
org.apache.flink.runtime.scheduler.adaptivebatch.BlockingInputInfo
All Implemented Interfaces:
IntermediateResultInfo, BlockingResultInfo

public class BlockingInputInfo extends Object implements BlockingResultInfo
Helper class that provides read-only information of input for VertexParallelismAndInputInfosDecider.
  • Constructor Details

    • BlockingInputInfo

      public BlockingInputInfo(BlockingResultInfo blockingResultInfo, int inputTypeNumber, boolean interInputsKeysCorrelated, boolean intraInputKeyCorrelated)
  • Method Details

    • getInputTypeNumber

      public int getInputTypeNumber()
    • isIntraInputKeyCorrelated

      public boolean isIntraInputKeyCorrelated()
    • areInterInputsKeysCorrelated

      public boolean areInterInputsKeysCorrelated()
    • getAggregatedSubpartitionBytes

      public List<Long> getAggregatedSubpartitionBytes()
    • isBroadcast

      public boolean isBroadcast()
      Description copied from interface: IntermediateResultInfo
      Determines whether the associated intermediate data set uses a broadcast distribution pattern.

      A broadcast distribution pattern indicates that all data produced by this intermediate data set should be broadcast to every downstream consumer.

      Specified by:
      isBroadcast in interface IntermediateResultInfo
      Returns:
      true if the intermediate data set is using a broadcast distribution pattern; false otherwise.
    • isPointwise

      public boolean isPointwise()
      Description copied from interface: IntermediateResultInfo
      Whether it is a pointwise result.
      Specified by:
      isPointwise in interface IntermediateResultInfo
      Returns:
      whether it is a pointwise result
    • getNumPartitions

      public int getNumPartitions()
      Description copied from interface: IntermediateResultInfo
      Get number of partitions for this result.
      Specified by:
      getNumPartitions in interface IntermediateResultInfo
      Returns:
      the number of partitions in this result
    • getNumSubpartitions

      public int getNumSubpartitions(int partitionIndex)
      Description copied from interface: IntermediateResultInfo
      Get number of subpartitions for the given partition.
      Specified by:
      getNumSubpartitions in interface IntermediateResultInfo
      Parameters:
      partitionIndex - the partition index
      Returns:
      the number of subpartitions of the partition
    • getNumBytesProduced

      public long getNumBytesProduced()
      Description copied from interface: BlockingResultInfo
      Return the num of bytes produced(numBytesProduced) by the producer.

      The difference between numBytesProduced and numBytesOut : numBytesProduced represents the number of bytes actually produced, and numBytesOut represents the number of bytes sent to downstream tasks. In unicast scenarios, these two values should be equal. In broadcast scenarios, numBytesOut should be (N * numBytesProduced), where N refers to the number of subpartitions.

      Specified by:
      getNumBytesProduced in interface BlockingResultInfo
      Returns:
      the num of bytes produced by the producer
    • getNumBytesProduced

      public long getNumBytesProduced(IndexRange partitionIndexRange, IndexRange subpartitionIndexRange)
      Description copied from interface: BlockingResultInfo
      Return the aggregated num of bytes according to the index range for partition and subpartition.
      Specified by:
      getNumBytesProduced in interface BlockingResultInfo
      Parameters:
      partitionIndexRange - range of the index of the consumed partition.
      subpartitionIndexRange - range of the index of the consumed subpartition.
      Returns:
      aggregated bytes according to the index ranges.
    • getResultId

      public IntermediateDataSetID getResultId()
      Description copied from interface: IntermediateResultInfo
      Get the intermediate result id.
      Specified by:
      getResultId in interface IntermediateResultInfo
      Returns:
      the intermediate result id
    • isSingleSubpartitionContainsAllData

      public boolean isSingleSubpartitionContainsAllData()
      Description copied from interface: IntermediateResultInfo
      Checks whether there is a single subpartition that contains all the produced data.
      Specified by:
      isSingleSubpartitionContainsAllData in interface IntermediateResultInfo
      Returns:
      true if one subpartition that contains all the data; false otherwise.
    • getSubpartitionBytesByPartitionIndex

      public Map<Integer,long[]> getSubpartitionBytesByPartitionIndex()
      Description copied from interface: BlockingResultInfo
      Gets subpartition bytes by partition index.
      Specified by:
      getSubpartitionBytesByPartitionIndex in interface BlockingResultInfo
      Returns:
      a map with integer keys representing partition indices and long array values representing subpartition bytes.
    • recordPartitionInfo

      public void recordPartitionInfo(int partitionIndex, ResultPartitionBytes partitionBytes)
      Description copied from interface: BlockingResultInfo
      Record the information of the result partition.
      Specified by:
      recordPartitionInfo in interface BlockingResultInfo
      Parameters:
      partitionIndex - the intermediate result partition index
      partitionBytes - the ResultPartitionBytes of the partition
    • resetPartitionInfo

      public void resetPartitionInfo(int partitionIndex)
      Description copied from interface: BlockingResultInfo
      Reset the information of the result partition.
      Specified by:
      resetPartitionInfo in interface BlockingResultInfo
      Parameters:
      partitionIndex - the intermediate result partition index