chia7712 commented on code in PR #16174:
URL: https://github.com/apache/kafka/pull/16174#discussion_r1624569720
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/consumer/TargetAssignmentBuilder.java:
##########
@@ -64,11 +64,11 @@ public static class TargetAssignmentResult {
/**
* The new target assignment for the group.
*/
- private final Map<String, Assignment> targetAssignment;
+ private final Map<String, MemberAssignment> targetAssignment;
TargetAssignmentResult(
List<CoordinatorRecord> records,
- Map<String, Assignment> targetAssignment
+ Map<String, MemberAssignment> targetAssignment
Review Comment:
Do we really need `Assignment`? It seems `Assignment` is almost same to
`MemberAssignment` except for the "unmodified" wrap. Maybe we can remove
`Assignment` by adding following changes to `MemberAssignment`
1. make `MemberAssignment#targetPartitions` return unmodified object. this
is the replacement for `Assignment#targetPartitions`
2. add setter to `MemberAssignment` for other use cases which try to update
inner `targetPartitions`
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]