AndrewJSchofield commented on code in PR #19602:
URL: https://github.com/apache/kafka/pull/19602#discussion_r2074929631


##########
tools/src/main/java/org/apache/kafka/tools/consumer/group/ShareGroupCommand.java:
##########
@@ -320,18 +321,29 @@ TreeMap<String, Entry<ShareGroupDescription, 
Collection<SharePartitionOffsetInfo
                 groupSpecs.put(groupId, offsetsSpec);
 
                 try {
-                    Map<TopicPartition, Long> earliestResult = 
adminClient.listShareGroupOffsets(groupSpecs).all().get().get(groupId);
+                    Map<TopicPartition, OffsetAndMetadata> startOffsets = 
adminClient.listShareGroupOffsets(groupSpecs).all().get().get(groupId);
 
                     Set<SharePartitionOffsetInformation> partitionOffsets = 
new HashSet<>();
 
-                    for (Entry<TopicPartition, Long> tp : 
earliestResult.entrySet()) {
-                        SharePartitionOffsetInformation partitionOffsetInfo = 
new SharePartitionOffsetInformation(
-                            groupId,
-                            tp.getKey().topic(),
-                            tp.getKey().partition(),
-                            
Optional.ofNullable(earliestResult.get(tp.getKey()))
-                        );
-                        partitionOffsets.add(partitionOffsetInfo);
+                    for (Entry<TopicPartition, OffsetAndMetadata> tp : 
startOffsets.entrySet()) {
+                        OffsetAndMetadata offset = 
startOffsets.get(tp.getKey());

Review Comment:
   Fixed



-- 
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

Reply via email to