Search in sources :

Example 1 with ListConsumerGroupOffsetsHandler

use of org.apache.kafka.clients.admin.internals.ListConsumerGroupOffsetsHandler in project kafka by apache.

the class KafkaAdminClient method listConsumerGroupOffsets.

@Override
public ListConsumerGroupOffsetsResult listConsumerGroupOffsets(final String groupId, final ListConsumerGroupOffsetsOptions options) {
    SimpleAdminApiFuture<CoordinatorKey, Map<TopicPartition, OffsetAndMetadata>> future = ListConsumerGroupOffsetsHandler.newFuture(groupId);
    ListConsumerGroupOffsetsHandler handler = new ListConsumerGroupOffsetsHandler(groupId, options.topicPartitions(), logContext);
    invokeDriver(handler, future, options.timeoutMs);
    return new ListConsumerGroupOffsetsResult(future.get(CoordinatorKey.byGroupId(groupId)));
}
Also used : CoordinatorKey(org.apache.kafka.clients.admin.internals.CoordinatorKey) ListConsumerGroupOffsetsHandler(org.apache.kafka.clients.admin.internals.ListConsumerGroupOffsetsHandler) Map(java.util.Map) TreeMap(java.util.TreeMap) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 CoordinatorKey (org.apache.kafka.clients.admin.internals.CoordinatorKey)1 ListConsumerGroupOffsetsHandler (org.apache.kafka.clients.admin.internals.ListConsumerGroupOffsetsHandler)1