smjn commented on code in PR #18928:
URL: https://github.com/apache/kafka/pull/18928#discussion_r1965654383


##########
tools/src/main/java/org/apache/kafka/tools/consumer/group/ShareGroupCommand.java:
##########
@@ -208,6 +222,67 @@ public void describeGroups() throws ExecutionException, 
InterruptedException {
             }
         }
 
+        Map<String, Throwable> deleteShareGroups() {
+            List<GroupListing> shareGroupIds = listDetailedShareGroups();
+            List<String> groupIds = opts.options.has(opts.allGroupsOpt)
+                ? shareGroupIds.stream().map(GroupListing::groupId).toList()
+                : opts.options.valuesOf(opts.groupOpt);
+
+            if (groupIds.isEmpty()) {
+                throw new IllegalArgumentException("--groups or --all-groups 
argument is mandatory");

Review Comment:
   @AndrewJSchofield 
   It is already happening correctly. The util method `getShareGroupService` 
was not performing the validation check and hence I missed it and added it at 
the wrong place.
   I will rectify.



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