Description
We can clean up the StreamsMetadataState class a bit by removing the #onChange invocation that currently occurs within StreamsPartitionAssignor#assign, which then lets us remove the `Cluster` parameter in that callback. Instead of building a fake Cluster object from the map of partition info when we invoke #onChange inside the StreamsPartitionAssignor#onAssignment method, we can just directly pass in the `Map<TopicPartition, PartitionInfo>` and replace the usage of `Cluster` everywhere in StreamsMetadataState
(I believe the current system is a historical artifact from when we used to require passing in a Cluster for the default partitioning strategy, which the StreamMetadataState needs to compute the partition for a key. At some point in the past we provided a better way to get the default partition, so we no longer need a Cluster parameter/field at all)
Attachments
Issue Links
- links to