You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Danica Fine (Jira)" <ji...@apache.org> on 2023/05/23 10:29:00 UTC
[jira] [Assigned] (KAFKA-14539) Simplify StreamsMetadataState by replacing the Cluster metadata with partition info map
[ https://issues.apache.org/jira/browse/KAFKA-14539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Danica Fine reassigned KAFKA-14539:
-----------------------------------
Assignee: Danica Fine
> Simplify StreamsMetadataState by replacing the Cluster metadata with partition info map
> ---------------------------------------------------------------------------------------
>
> Key: KAFKA-14539
> URL: https://issues.apache.org/jira/browse/KAFKA-14539
> Project: Kafka
> Issue Type: Improvement
> Components: streams
> Reporter: A. Sophie Blee-Goldman
> Assignee: Danica Fine
> Priority: Major
>
> 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)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)