ijuma commented on a change in pull request #10084: URL: https://github.com/apache/kafka/pull/10084#discussion_r573823788
########## File path: clients/src/main/java/org/apache/kafka/clients/admin/Admin.java ########## @@ -1486,41 +1486,46 @@ default DescribeFeaturesResult describeFeatures() { UpdateFeaturesResult updateFeatures(Map<String, FeatureUpdate> featureUpdates, UpdateFeaturesOptions options); /** - * Permanently remove a broker and reassign any partitions on the broker. + * Unregister a broker. * <p> - * This operation is supported only on self-managed Kafka clusters (i.e. brokers which do not rely on Zookeeper). + * This operation does not have any effect on partition assignments. It is supported + * only on Kafka clusters which use Raft to store metadata, rather than ZooKeeper. * - * @param brokerId the broker id to unregister. + * This is a convenience method for {@link #unregisterBroker(int, UnregisterBrokerOptions)} * - * <p>This is a convenience method for {@link #decommissionBroker(int, DecommissionBrokerOptions)} + * @param brokerId the broker id to unregister. * - * @return the {@link DecommissionBrokerResult} containing the result + * @return the {@link UnregisterBrokerResult} containing the result */ - default DecommissionBrokerResult decommissionBroker(int brokerId) { - return decommissionBroker(brokerId, new DecommissionBrokerOptions()); + @InterfaceStability.Unstable + default UnregisterBrokerResult unregisterBroker(int brokerId) { + return unregisterBroker(brokerId, new UnregisterBrokerOptions()); } /** - * Permanently remove a broker and reassign any partitions on the broker. + * Unregister a broker. * <p> - * This operation is supported only on self-managed Kafka clusters (i.e. brokers which do not rely on Zookeeper). + * This operation does not have any effect on partition assignments. It is supported + * only on Kafka clusters which use Raft to store metadata, rather than ZooKeeper. * * The following exceptions can be anticipated when calling {@code get()} on the future from the * returned {@link DescribeFeaturesResult}: Review comment: "DescribeFeaturesResult" needs to be updated. ########## File path: core/src/main/scala/kafka/server/KafkaApis.scala ########## @@ -3390,6 +3390,11 @@ class KafkaApis(val requestChannel: RequestChannel, new DescribeProducersResponse(response.setThrottleTimeMs(requestThrottleMs))) } + def handleUnregisterBrokerRequest(request: RequestChannel.Request): Unit = { + throw new UnsupportedVersionException("The broker unregistration API is not available when using " + + "Apache ZooKeeper mode.") Review comment: This is a bit confusing since this method can be called when the built-in quorum mode is used too. Or am I missing something? ---------------------------------------------------------------- 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