Copilot commented on code in PR #20702:
URL: https://github.com/apache/kafka/pull/20702#discussion_r2431848671
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsGroup.java:
##########
@@ -231,6 +237,9 @@ public StreamsGroup(
this.currentWarmupTaskToProcessIds = new
TimelineHashMap<>(snapshotRegistry, 0);
this.topology = new TimelineObject<>(snapshotRegistry,
Optional.empty());
this.configuredTopology = new TimelineObject<>(snapshotRegistry,
Optional.empty());
+ this.assignmentConfigs = new TimelineHashMap<>(snapshotRegistry, 0);
+ // Set default assignment configuration
+ this.assignmentConfigs.put("num.standby.replicas", "0");
Review Comment:
The default assignment configuration should use a constant instead of the
hardcoded string '0' to improve maintainability and avoid magic numbers.
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsGroup.java:
##########
@@ -1098,4 +1107,21 @@ public int endpointInformationEpoch() {
public void setEndpointInformationEpoch(int endpointInformationEpoch) {
this.endpointInformationEpoch = endpointInformationEpoch;
}
+
+ /**
+ * @return The assignment configurations for this streams group.
+ */
+ public Map<String, String> assignmentConfigs() {
+ return Collections.unmodifiableMap(assignmentConfigs);
+ }
+
+ /**
+ * Sets a specific assignment configuration.
+ *
+ * @param key The configuration key.
+ * @param value The configuration value.
+ */
Review Comment:
[nitpick] Extra blank line in JavaDoc comment. Remove the blank line after
'Sets a specific assignment configuration.' for consistent formatting.
--
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]