cmccabe commented on code in PR #16058: URL: https://github.com/apache/kafka/pull/16058#discussion_r1625013008
########## clients/src/main/java/org/apache/kafka/clients/admin/RaftVoterEndpoint.java: ########## @@ -0,0 +1,110 @@ +/* + * 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; + +import org.apache.kafka.common.annotation.InterfaceStability; + +import java.util.Locale; +import java.util.Objects; + +/** + * An endpoint for a raft quorum voter. + */ +@InterfaceStability.Stable +public class RaftVoterEndpoint { + private final String name; + private final String host; + private final int port; + private final String securityProtocol; Review Comment: > Did you consider using o.a.k.c.Endpoints? This struct has a similar structure to Endpoints. `org.apache.kafka.common.Endpoint` is not intended to be used as part of the Admin Client API. That class drags in the non-public class `org.apache.kafka.common.security.auth.SecurityProtocol`. Additionally we may want to change it in the future, which we could not do if it were part of the admin API. (`org.apache.kafka.common.Endpoint` did get dragged into the Authorizer API, which I think was a mistake, but that's a separate discussion. And not many people have ever written Authorizers, so changing that stuff is not impossible) > During the KIP discussion we agreed to not add security protocol to the AddRaftVoter request. Mainly because it is not needed and that there is a requirement that the listener name, security protocol and the protocol configuration must match in all of the voters if they exist. Is the expectation that the security protocol is found by looking up the endpoint name in `listener.security.protocol.map`? What happens if it's not there? Do we fail or fall back to `PLAINTEXT`? -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org