You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/06 06:23:52 UTC

[GitHub] [kafka] feyman2016 commented on a change in pull request #8589: KAFKA-9146: KIP-571 Add option to force delete active members in StreamsResetter

feyman2016 commented on a change in pull request #8589:
URL: https://github.com/apache/kafka/pull/8589#discussion_r420568190



##########
File path: clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -3612,6 +3611,27 @@ private boolean dependsOnSpecificNode(ConfigResource resource) {
                 || resource.type() == ConfigResource.Type.BROKER_LOGGER;
     }
 
+    private List<MemberIdentity> getMembersFromGroup(String groupId) {
+        Collection<MemberDescription> members = new ArrayList<>();
+        try {
+            members = describeConsumerGroups(Collections.singleton(groupId)).describedGroups().get(groupId).get().members();
+        } catch (Throwable ex) {
+            System.out.println("Encounter exception when trying to get members from group: " + groupId);
+            ex.printStackTrace();
+        }
+
+        List<MemberIdentity> memberToRemove = new ArrayList<>();
+        for (MemberDescription member: members) {

Review comment:
       Thanks, I have run the style check before pushing the commit and had run it again upon your comments, however, it didn't capture any error.  Should it be like:
   ```
   for (final MemberDescription member: members) {
   ```
   ?




----------------------------------------------------------------
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:
users@infra.apache.org