Class VertexInputInfoComputationUtils


  • public class VertexInputInfoComputationUtils
    extends Object
    Util to compute JobVertexInputInfos for execution job vertex.
    • Method Detail

      • computeVertexInputInfoForPointwise

        public static JobVertexInputInfo computeVertexInputInfoForPointwise​(int sourceCount,
                                                                            int targetCount,
                                                                            Function<Integer,​Integer> numOfSubpartitionsRetriever,
                                                                            boolean isDynamicGraph)
        Compute the JobVertexInputInfo for a DistributionPattern.POINTWISE edge. This computation algorithm will evenly distribute subpartitions to downstream subtasks according to the number of subpartitions. Different downstream subtasks consume roughly the same number of subpartitions.
        Parameters:
        sourceCount - the parallelism of upstream
        targetCount - the parallelism of downstream
        numOfSubpartitionsRetriever - a retriever to get the number of subpartitions
        isDynamicGraph - whether is dynamic graph
        Returns:
        the computed JobVertexInputInfo
      • computeVertexInputInfoForAllToAll

        public static JobVertexInputInfo computeVertexInputInfoForAllToAll​(int sourceCount,
                                                                           int targetCount,
                                                                           Function<Integer,​Integer> numOfSubpartitionsRetriever,
                                                                           boolean isDynamicGraph,
                                                                           boolean isBroadcast,
                                                                           boolean isSingleSubpartitionContainsAllData)
        Compute the JobVertexInputInfo for a DistributionPattern.ALL_TO_ALL edge. This computation algorithm will evenly distribute subpartitions to downstream subtasks according to the number of subpartitions. Different downstream subtasks consume roughly the same number of subpartitions.
        Parameters:
        sourceCount - the parallelism of upstream
        targetCount - the parallelism of downstream
        numOfSubpartitionsRetriever - a retriever to get the number of subpartitions
        isDynamicGraph - whether is dynamic graph
        isBroadcast - whether the edge is broadcast
        isSingleSubpartitionContainsAllData - whether single subpartition contains all data
        Returns:
        the computed JobVertexInputInfo