Class DefaultVertexParallelismAndInputInfosDecider

  • All Implemented Interfaces:
    VertexParallelismAndInputInfosDecider

    public class DefaultVertexParallelismAndInputInfosDecider
    extends Object
    implements VertexParallelismAndInputInfosDecider
    Default implementation of VertexParallelismAndInputInfosDecider. This implementation will decide parallelism and JobVertexInputInfos as follows:

    1. For job vertices whose inputs are all ALL_TO_ALL edges, evenly distribute data to downstream subtasks, make different downstream subtasks consume roughly the same amount of data.

    2. For other cases, evenly distribute subpartitions to downstream subtasks, make different downstream subtasks consume roughly the same number of subpartitions.

    • Method Detail

      • decideParallelismAndInputInfosForVertex

        public ParallelismAndInputInfos decideParallelismAndInputInfosForVertex​(JobVertexID jobVertexId,
                                                                                List<BlockingResultInfo> consumedResults,
                                                                                int vertexInitialParallelism,
                                                                                int vertexMaxParallelism)
        Description copied from interface: VertexParallelismAndInputInfosDecider
        Decide the parallelism and JobVertexInputInfos for this job vertex.
        Specified by:
        decideParallelismAndInputInfosForVertex in interface VertexParallelismAndInputInfosDecider
        Parameters:
        jobVertexId - The job vertex id
        consumedResults - The information of consumed blocking results
        vertexInitialParallelism - The initial parallelism of the job vertex. If it's a positive number, it will be respected. If it's not set(equals to ExecutionConfig.PARALLELISM_DEFAULT), a parallelism will be automatically decided for the vertex.
        vertexMaxParallelism - The max parallelism of the job vertex.
        Returns:
        the parallelism and vertex input infos.