feyman2016 commented on a change in pull request #8589: URL: https://github.com/apache/kafka/pull/8589#discussion_r429087051
########## File path: clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java ########## @@ -3621,24 +3640,31 @@ public RemoveMembersFromConsumerGroupResult removeMembersFromConsumerGroup(Strin KafkaFutureImpl<Map<MemberIdentity, Errors>> future = new KafkaFutureImpl<>(); ConsumerGroupOperationContext<Map<MemberIdentity, Errors>, RemoveMembersFromConsumerGroupOptions> context = - new ConsumerGroupOperationContext<>(groupId, options, deadline, future); + new ConsumerGroupOperationContext<>(groupId, options, deadline, future); + List<MemberIdentity> members; + if (options.removeAll()) { + members = getMembersFromGroup(groupId); + } else { + members = options.members().stream().map( + MemberToRemove::toMemberIdentity).collect(Collectors.toList()); + } Call findCoordinatorCall = getFindCoordinatorCall(context, - () -> getRemoveMembersFromGroupCall(context)); + () -> getRemoveMembersFromGroupCall(context, members)); runnable.call(findCoordinatorCall, startFindCoordinatorMs); return new RemoveMembersFromConsumerGroupResult(future, options.members()); } - private Call getRemoveMembersFromGroupCall(ConsumerGroupOperationContext<Map<MemberIdentity, Errors>, RemoveMembersFromConsumerGroupOptions> context) { + private Call getRemoveMembersFromGroupCall(ConsumerGroupOperationContext<Map<MemberIdentity, Errors>, + RemoveMembersFromConsumerGroupOptions> context, List<MemberIdentity> allMembers) { Review comment: Yeah, 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org