Class DefaultPartitionGrouper

  • All Implemented Interfaces:
    PartitionGrouper

    @Deprecated
    public class DefaultPartitionGrouper
    extends Object
    implements PartitionGrouper
    Deprecated.
    since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
    Default implementation of the PartitionGrouper interface that groups partitions by the partition id. Join operations requires that topics of the joining entities are copartitoned, i.e., being partitioned by the same key and having the same number of partitions. Copartitioning is ensured by having the same number of partitions on joined topics, and by using the serialization and Producer's default partitioner.
    • Constructor Detail

      • DefaultPartitionGrouper

        public DefaultPartitionGrouper()
        Deprecated.
    • Method Detail

      • partitionGroups

        public Map<TaskId,​Set<TopicPartition>> partitionGroups​(Map<Integer,​Set<String>> topicGroups,
                                                                     Cluster metadata)
        Deprecated.
        Generate tasks with the assigned topic partitions.
        Specified by:
        partitionGroups in interface PartitionGrouper
        Parameters:
        topicGroups - group of topics that need to be joined together
        metadata - metadata of the consuming cluster
        Returns:
        The map from generated task ids to the assigned partitions
      • maxNumPartitions

        protected int maxNumPartitions​(Cluster metadata,
                                       Set<String> topics)
        Deprecated.
        Throws:
        StreamsException - if no metadata can be received for a topic