[ 
https://issues.apache.org/jira/browse/KAFKA-6884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470680#comment-16470680
 ] 

Attila Sasvari commented on KAFKA-6884:
---------------------------------------

[~hachikuji] thanks for the additional information!
 - I replaced the old, Scala based AdminClient with KafkaAdminClient in 
ConsumerGroupCommand, and started to resolve the issues.
 - As I see, currently AdminClient.scala fetches [metadata state information of 
the 
groups|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/AdminClient.scala#L315]
 that is used in 
[ConsumerGroupCommand|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala#L153]
 at multiple places (such as 
[collectGroupOffsets|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala#L587],
 [collectGroupMembers 
|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala#L593],
 and so on).
 - KIP-222's DescribeConsumerGroupsResult returned by the new AdminClient's 
describeConsumerGroups does not include this information, see for example [the 
member fields 
|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/DescribeConsumerGroupsResult.java]
 and 
[ConsumerGroupDescription|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/ConsumerGroupDescription.java].
 - Without state information we cannot say, for example, whether a consumer 
group is being rebalanced.

I believe the problem is that KafkaAdminClient does not extract metadata state 
from 
[DescribeGroupsResponse.GroupMetadata|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java#L2396]
 when constructing the DescribeConsumerGroupsResult. Do I understand it 
correctly? What do you think: shall I fix it here or in a separate JIRA?

> ConsumerGroupCommand should use new AdminClient
> -----------------------------------------------
>
>                 Key: KAFKA-6884
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6884
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Jason Gustafson
>            Assignee: Attila Sasvari
>            Priority: Major
>
> Now that we have KIP-222, we should update consumer-groups.sh to use the new 
> AdminClient.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to