Skip to content

MINOR: Simplify AlterPartitionManager request building and tests#22589

Open
joshua2519 wants to merge 1 commit into
apache:trunkfrom
joshua2519:minor-improve-AlterPartitionManager
Open

MINOR: Simplify AlterPartitionManager request building and tests#22589
joshua2519 wants to merge 1 commit into
apache:trunkfrom
joshua2519:minor-improve-AlterPartitionManager

Conversation

@joshua2519

Copy link
Copy Markdown
Contributor

Follow-up to #21432 addressing review feedback:

  • buildRequest: replace Collectors.groupingBy with a single-pass find-or-create over a local Map<Uuid, TopicData>, avoiding the intermediate Map<Uuid, List<AlterPartitionItem>>.
  • handleAlterPartitionResponse: factor the CLUSTER_AUTHORIZATION_FAILED message into a local to drop the duplicated string literal.
  • AlterPartitionManagerTest: drop the redundant TopicPartitionKey record in favor of TopicIdPartition.

  - buildRequest: replace groupingBy with single-pass find-or-create map
  - drop duplicated CLUSTER_AUTHORIZATION_FAILED message literal
  - test: use TopicIdPartition instead of a custom key record
@github-actions github-actions Bot added triage PRs from the community core Kafka Broker small Small PRs labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved core Kafka Broker small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants