Skip to main content

Module uniform_assignor

Module uniform_assignor 

Source
Expand description

Uniform group-assignor kernels (KIP-848 UniformAssignor).

Kafka’s server-side UniformAssignor (org.apache.kafka.coordinator.group.assignor) picks one of two builders. UniformHomogeneousAssignmentBuilder runs when every member subscribes to the same topics, and UniformHeterogeneousAssignmentBuilder runs otherwise. Both rank balance ahead of stickiness, and neither consults replica racks. This module holds the two decisions that the builders make about members: the quota each member gets in the homogeneous builder, and the least-loaded subscriber that receives an unassigned partition in the heterogeneous builder. The host in krabka-broker owns the partition bookkeeping around them.

Structs§

HomogeneousMemberQuota
One member’s quota in the homogeneous builder.
SubscriberLoad
A subscriber’s load while the heterogeneous builder assigns one topic.
UniformQuotaSplit
Kafka’s floor-and-remainder split of a partition total over the members.

Functions§

homogeneous_member_quotas
Every member’s quota in the homogeneous builder, in member order.
select_least_loaded
Choose the subscriber that receives the next unassigned partition of a topic in UniformHeterogeneousAssignmentBuilder.assignRemainingPartitions.
uniform_quota_split
Split total_partitions over member_count members, as UniformHomogeneousAssignmentBuilder.build does.