lucasbru commented on code in PR #20702:
URL: https://github.com/apache/kafka/pull/20702#discussion_r2434719267
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/streams/StreamsCoordinatorRecordHelpersTest.java:
##########
@@ -677,7 +691,7 @@ public void
testNewStreamsGroupMemberTombstoneRecordNullMemberId() {
@Test
public void testNewStreamsGroupEpochRecordNullGroupId() {
Review Comment:
nit: should be called testNewStreamsGroupMetadataRecord (sorry, not your
change, but while you are at it...)
##########
group-coordinator/src/main/resources/common/message/StreamsGroupMetadataValue.json:
##########
@@ -26,6 +26,23 @@
{ "name": "MetadataHash", "versions": "0+", "type": "int64",
"about": "The hash of all topics in the group." },
{ "name": "ValidatedTopologyEpoch", "versions": "0+", "taggedVersions":
"0+", "tag": 0, "default": -1, "type": "int32",
- "about": "The topology epoch whose topics where validated to be present
in a valid configuration in the metadata." }
+ "about": "The topology epoch whose topics where validated to be present
in a valid configuration in the metadata." },
+ {
+ "name": "AssignmentConfigs",
+ "type": "[]AssignmentConfig",
+ "taggedVersions": "0+",
+ "nullableVersions": "0+",
+ "tag": 1,
+ "default": null,
+ "about": "Assignment configuration parameters as key-value pairs."
Review Comment:
nit: "Last used assignment configuration..."?
##########
group-coordinator/src/main/resources/common/message/StreamsGroupMetadataValue.json:
##########
@@ -26,6 +26,23 @@
{ "name": "MetadataHash", "versions": "0+", "type": "int64",
"about": "The hash of all topics in the group." },
{ "name": "ValidatedTopologyEpoch", "versions": "0+", "taggedVersions":
"0+", "tag": 0, "default": -1, "type": "int32",
- "about": "The topology epoch whose topics where validated to be present
in a valid configuration in the metadata." }
+ "about": "The topology epoch whose topics where validated to be present
in a valid configuration in the metadata." },
+ {
Review Comment:
nit, we typically use 2 lines per field in these files
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsCoordinatorRecordHelpers.java:
##########
@@ -100,9 +100,21 @@ public static CoordinatorRecord
newStreamsGroupMetadataRecord(
String groupId,
int newGroupEpoch,
long metadataHash,
- int validatedTopologyEpoch
+ int validatedTopologyEpoch,
+ Map<String, String> assignmentConfigs
) {
Objects.requireNonNull(groupId, "groupId should not be null here");
+ Objects.requireNonNull(assignmentConfigs, "assignmentConfigs should
not be null here");
+
+ List<StreamsGroupMetadataValue.AssignmentConfig> assignmentConfigList
= new ArrayList<>();
+ if (!assignmentConfigs.isEmpty()) {
Review Comment:
nit: I think it's easier to read without this if
--
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]