mumrah commented on a change in pull request #9715: URL: https://github.com/apache/kafka/pull/9715#discussion_r557444603
########## File path: core/src/main/scala/kafka/server/ApisUtils.scala ########## @@ -0,0 +1,204 @@ +/** + * 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 kafka.server + +import kafka.cluster.Partition +import kafka.coordinator.group.GroupCoordinator +import kafka.coordinator.transaction.TransactionCoordinator + +import java.lang.{Byte => JByte} +import java.util.Collections +import kafka.network.RequestChannel +import kafka.security.authorizer.AclEntry +import kafka.server.QuotaFactory.QuotaManagers +import kafka.utils.Logging +import org.apache.kafka.common.acl.AclOperation +import org.apache.kafka.common.errors.ClusterAuthorizationException +import org.apache.kafka.common.internals.Topic +import org.apache.kafka.common.network.Send +import org.apache.kafka.common.requests.{AbstractRequest, AbstractResponse, RequestContext} +import org.apache.kafka.common.resource.Resource.CLUSTER_NAME +import org.apache.kafka.common.resource.ResourceType.CLUSTER +import org.apache.kafka.common.resource.{PatternType, Resource, ResourcePattern, ResourceType} +import org.apache.kafka.common.utils.{LogContext, Time, Utils} +import org.apache.kafka.server.authorizer.{Action, AuthorizationResult, Authorizer} + +import scala.jdk.CollectionConverters._ + +/** + * Helper methods and helper class factories for request handlers. Provides common functionality around throttling, + * authorizations, and error handling + */ +object ApisUtils { Review comment: It is pretty awkward, but `ApiUtils` was taken. `RequestHandlerUtils` sounds good. ---------------------------------------------------------------- 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