Class DefaultPartitionGrouper
- java.lang.Object
-
- org.apache.kafka.streams.processor.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-7785Default implementation of thePartitionGrouper
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 Summary
Constructors Constructor Description DefaultPartitionGrouper()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected int
maxNumPartitions(Cluster metadata, Set<String> topics)
Deprecated.Map<TaskId,Set<TopicPartition>>
partitionGroups(Map<Integer,Set<String>> topicGroups, Cluster metadata)
Deprecated.Generate tasks with the assigned topic partitions.
-
-
-
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 interfacePartitionGrouper
- Parameters:
topicGroups
- group of topics that need to be joined togethermetadata
- 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
-
-