Class NettyShuffleMaster

    • Constructor Detail

      • NettyShuffleMaster

        public NettyShuffleMaster​(org.apache.flink.configuration.Configuration conf)
    • Method Detail

      • registerPartitionWithProducer

        public CompletableFuture<NettyShuffleDescriptor> registerPartitionWithProducer​(org.apache.flink.api.common.JobID jobID,
                                                                                       PartitionDescriptor partitionDescriptor,
                                                                                       ProducerDescriptor producerDescriptor)
        Description copied from interface: ShuffleMaster
        Asynchronously register a partition and its producer with the shuffle service.

        The returned shuffle descriptor is an internal handle which identifies the partition internally within the shuffle service. The descriptor should provide enough information to read from or write data to the partition.

        Specified by:
        registerPartitionWithProducer in interface ShuffleMaster<NettyShuffleDescriptor>
        Parameters:
        jobID - job ID of the corresponding job which registered the partition
        partitionDescriptor - general job graph information about the partition
        producerDescriptor - general producer information (location, execution id, connection info)
        Returns:
        future with the partition shuffle descriptor used for producer/consumer deployment and their data exchange.
      • computeShuffleMemorySizeForTask

        public org.apache.flink.configuration.MemorySize computeShuffleMemorySizeForTask​(TaskInputsOutputsDescriptor desc)
        JM announces network memory requirement from the calculating result of this method. Please note that the calculating algorithm depends on both I/O details of a vertex and network configuration, e.g. NettyShuffleEnvironmentOptions.NETWORK_BUFFERS_PER_CHANNEL and NettyShuffleEnvironmentOptions.NETWORK_EXTRA_BUFFERS_PER_GATE, which means we should always keep the consistency of configurations between JM, RM and TM in fine-grained resource management, thus to guarantee that the processes of memory announcing and allocating respect each other.
        Specified by:
        computeShuffleMemorySizeForTask in interface ShuffleMaster<NettyShuffleDescriptor>
        Parameters:
        desc - describes task inputs and outputs information for shuffle memory calculation.
        Returns:
        shuffle memory size for a task with the given TaskInputsOutputsDescriptor.