You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/12 01:12:00 UTC

[jira] [Commented] (KAFKA-6058) KIP-222: Add "describe consumer groups" and "list consumer groups" to KafkaAdminClient

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

ASF GitHub Bot commented on KAFKA-6058:
---------------------------------------

guozhangwang opened a new pull request #4856: KAFKA-6058: Refactor consumer API result return types
URL: https://github.com/apache/kafka/pull/4856
 
 
   Refactored the return types in consumer group APIs the following way:
   
   ```
   Map<TopicPartition, KafkaFuture<Void>> DeleteConsumerGroupsResult#deletedGroups()
   
   Map<TopicPartition, KafkaFuture<ConsumerGroupDescription>> DescribeConsumerGroupsResult#describedGroups()
   
   KafkaFuture<Collection<ConsumerGroupListing>> ListConsumerGroupsResult#listings()
   
   KafkaFuture<Map<TopicPartition, OffsetAndMetadata>> ListConsumerGroupOffsetsResult#partitionsToOffsetAndMetadata()
   ```
   
   1. For DeleteConsumerGroupsResult and DescribeConsumerGroupsResult, for each group id we have two round-trips to get the coordinator, and then send the delete / describe request; I leave the potential optimization of batching requests for future work.
   
   2. For ListConsumerGroupOffsetsResult, it is a simple single round-trip and hence the whole map is wrapped as a Future.
   
   3. ListConsumerGroupsResult, it is the most tricky one: we would only know how many futures we should wait for after the first listNode returns, and hence I constructed the flattened future in the middle wrapped with the underlying map of futures.
   
   3.a Another big change I made is, we do not return the exception in the flattened future if only a few of the nodes returns ERROR code, and instead just return the rest of the listings; to use that I added a new `anyOf` function in `KafkaFuture`.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> KIP-222: Add "describe consumer groups" and "list consumer groups" to KafkaAdminClient
> --------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6058
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6058
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>            Reporter: Matthias J. Sax
>            Assignee: Jorge Quilcate
>            Priority: Major
>              Labels: kip-222
>             Fix For: 1.2.0
>
>
> {{KafkaAdminClient}} does not allow to get information about consumer groups. This feature is supported by old {{kafka.admin.AdminClient}} though.
> We should add {{KafkaAdminClient#describeConsumerGroups()}} and {{KafkaAdminClient#listConsumerGroup()}}.
> Associated KIP: KIP-222



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