Search in sources :

Example 1 with AlterConsumerGroupOffsetsHandler

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

the class KafkaAdminClient method alterConsumerGroupOffsets.

@Override
public AlterConsumerGroupOffsetsResult alterConsumerGroupOffsets(String groupId, Map<TopicPartition, OffsetAndMetadata> offsets, AlterConsumerGroupOffsetsOptions options) {
    SimpleAdminApiFuture<CoordinatorKey, Map<TopicPartition, Errors>> future = AlterConsumerGroupOffsetsHandler.newFuture(groupId);
    AlterConsumerGroupOffsetsHandler handler = new AlterConsumerGroupOffsetsHandler(groupId, offsets, logContext);
    invokeDriver(handler, future, options.timeoutMs);
    return new AlterConsumerGroupOffsetsResult(future.get(CoordinatorKey.byGroupId(groupId)));
}
Also used : CoordinatorKey(org.apache.kafka.clients.admin.internals.CoordinatorKey) Map(java.util.Map) TreeMap(java.util.TreeMap) HashMap(java.util.HashMap) AlterConsumerGroupOffsetsHandler(org.apache.kafka.clients.admin.internals.AlterConsumerGroupOffsetsHandler)

Aggregations

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