dengziming commented on a change in pull request #10483: URL: https://github.com/apache/kafka/pull/10483#discussion_r607569144
########## File path: clients/src/main/java/org/apache/kafka/clients/admin/internals/CoordinatorStrategy.java ########## @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.kafka.clients.admin.internals; + +import org.apache.kafka.common.errors.GroupAuthorizationException; +import org.apache.kafka.common.errors.TransactionalIdAuthorizationException; +import org.apache.kafka.common.message.FindCoordinatorRequestData; +import org.apache.kafka.common.protocol.Errors; +import org.apache.kafka.common.requests.AbstractResponse; +import org.apache.kafka.common.requests.FindCoordinatorRequest; +import org.apache.kafka.common.requests.FindCoordinatorResponse; +import org.apache.kafka.common.utils.LogContext; +import org.slf4j.Logger; + +import java.util.Objects; +import java.util.Set; + +public class CoordinatorStrategy<V> implements AdminApiLookupStrategy<CoordinatorKey> { + private final Logger log; + + public CoordinatorStrategy( + LogContext logContext + ) { + this.log = logContext.logger(CoordinatorStrategy.class); + } + + @Override + public ApiRequestScope lookupScope(CoordinatorKey key) { + // The `FindCoordinator` API does not support batched lookups, so we use a + // separate lookup context for each coordinator key we need to lookup + return new LookupRequestScope(key); Review comment: Will we support batching lookups in the future? -- 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: us...@infra.apache.org