FrankYang0529 commented on code in PR #19544: URL: https://github.com/apache/kafka/pull/19544#discussion_r2057669349
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsRebalanceData.java: ########## @@ -300,6 +301,8 @@ public String toString() { private final AtomicBoolean shutdownRequested = new AtomicBoolean(false); + private final AtomicReference<List<StreamsGroupHeartbeatResponseData.Status>> statuses = new AtomicReference<>(Collections.emptyList()); Review Comment: ```suggestion private final AtomicReference<List<StreamsGroupHeartbeatResponseData.Status>> statuses = new AtomicReference<>(List.of()); ``` ########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsRebalanceData.java: ########## @@ -346,11 +349,24 @@ public Map<HostInfo, List<TopicPartition>> partitionsByHost() { return partitionsByHost.get(); } + /** For the current stream thread to request a shutdown of all Streams clients belonging to the same applications. */ Review Comment: The comment of `shutdownRequested` uses singular. It would probably be better to unify it. ```suggestion /** For the current stream thread to request a shutdown of all Streams clients belonging to the same application. */ ``` ########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/StreamsRebalanceDataTest.java: ########## @@ -420,4 +420,21 @@ public void streamsRebalanceDataShouldBeConstructedWithShutDownRequestedSetFalse assertFalse(streamsRebalanceData.shutdownRequested()); } + + @Test + public void streamsRebalanceDataShouldBeConstructedWithEmptyStatuses() { + final UUID processId = UUID.randomUUID(); + final Optional<StreamsRebalanceData.HostInfo> endpoint = Optional.of(new StreamsRebalanceData.HostInfo("localhost", 9090)); + final Map<String, StreamsRebalanceData.Subtopology> subtopologies = new HashMap<>(); Review Comment: ```suggestion final Map<String, StreamsRebalanceData.Subtopology> subtopologies = Map.of(); ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org