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


##########
tools/src/main/java/org/apache/kafka/tools/consumer/group/ShareGroupCommand.java:
##########
@@ -263,34 +265,53 @@ TreeMap<String, Entry<ShareGroupDescription, 
Collection<SharePartitionOffsetInfo
             return groupOffsets;
         }
 
-        private void printOffsets(TreeMap<String, Entry<ShareGroupDescription, 
Collection<SharePartitionOffsetInformation>>> offsets) {
+        private void printOffsets(TreeMap<String, Entry<ShareGroupDescription, 
Collection<SharePartitionOffsetInformation>>> offsets, boolean verbose) {
             offsets.forEach((groupId, tuple) -> {
                 ShareGroupDescription description = tuple.getKey();
                 Collection<SharePartitionOffsetInformation> offsetsInfo = 
tuple.getValue();
                 if (maybePrintEmptyGroupState(groupId, 
description.groupState(), offsetsInfo.size())) {
-                    String fmt = printOffsetFormat(groupId, offsetsInfo);
-                    System.out.printf(fmt, "GROUP", "TOPIC", "PARTITION", 
"START-OFFSET");
+                    String fmt = printOffsetFormat(groupId, offsetsInfo, 
verbose);
+
+                    if (verbose) {
+                        System.out.printf(fmt, "GROUP", "TOPIC", "PARTITION", 
"LEADER-EPOCH", "START-OFFSET");

Review Comment:
   No plans so far. I'm essentially bringing `kafka-share-groups.sh` in line 
with `kafka-consumer-groups.sh` with the `--verbose` option introduced in 
KIP-1099. The leader epoch information has essentially the same benefit for 
understanding the group state as it has with a consumer group.



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

Reply via email to