diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/Admin.java b/clients/src/main/java/org/apache/kafka/clients/admin/Admin.java index a09a53efadca5..7c2d80f39b306 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/Admin.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/Admin.java @@ -199,11 +199,11 @@ default CreateTopicsResult createTopics(Collection newTopics) { */ CreateTopicsResult createTopics(Collection newTopics, CreateTopicsOptions options); - default CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map xinfraTopics) { - return createFederatedTopicsZnode(xinfraTopics, new CreateFederatedTopicsZnodeOptions()); + default CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map federatedTopics) { + return createFederatedTopicsZnode(federatedTopics, new CreateFederatedTopicsZnodeOptions()); } - CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map xinfraTopics, + CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map federatedTopics, CreateFederatedTopicsZnodeOptions options); /** diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/CreateOrDeleteFederatedTopicsZnodeResult.java b/clients/src/main/java/org/apache/kafka/clients/admin/CreateOrDeleteFederatedTopicsZnodeResult.java index ae7a29f0e196f..4ec2436ddf829 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/CreateOrDeleteFederatedTopicsZnodeResult.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/CreateOrDeleteFederatedTopicsZnodeResult.java @@ -22,7 +22,7 @@ import org.apache.kafka.common.annotation.InterfaceStability; /** - * The result of {@link Admin#CreateXinfraTopicZnode()} or {@link Admin#DeleteXinfraTopicZnode()}. + * The result of {@link Admin#CreateFederatedTopicZnode()} or {@link Admin#DeleteFederatedTopicZnode()}. * * The API of this class is evolving, see {@link Admin} for details. */ diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java b/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java index 54a05776eee96..159c22f8c7eae 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java @@ -1600,12 +1600,12 @@ public CreateTopicsResult createTopics(final Collection newTopics, } @Override - public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(final Map xinfraTopics, + public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(final Map federatedTopics, final CreateFederatedTopicsZnodeOptions options) { - final Map> topicFutures = new HashMap<>(xinfraTopics.size()); + final Map> topicFutures = new HashMap<>(federatedTopics.size()); final long now = time.milliseconds(); List topics = new ArrayList<>(); - xinfraTopics.forEach((topic, namespace) -> { + federatedTopics.forEach((topic, namespace) -> { topics.add(new LiFederatedTopicCreateRequestData.FederatedTopics().setName(topic).setNamespace(namespace)); topicFutures.put(topic, new KafkaFutureImpl<>()); }); diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/NoOpAdminClient.java b/clients/src/main/java/org/apache/kafka/clients/admin/NoOpAdminClient.java index 1bd93184559b6..f4150a7151d1f 100644 --- a/clients/src/main/java/org/apache/kafka/clients/admin/NoOpAdminClient.java +++ b/clients/src/main/java/org/apache/kafka/clients/admin/NoOpAdminClient.java @@ -47,7 +47,7 @@ public CreateTopicsResult createTopics(Collection newTopics, CreateTop } @Override - public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map xinfraTopics, + public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map federatedTopics, CreateFederatedTopicsZnodeOptions options) { return null; } diff --git a/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java b/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java index 7d9d494937da5..edfbe5600ed45 100644 --- a/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java +++ b/clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java @@ -329,7 +329,7 @@ synchronized public CreateTopicsResult createTopics(Collection newTopi } @Override - public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map xinfraTopics, + public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map federatedTopics, CreateFederatedTopicsZnodeOptions options) { throw new UnsupportedOperationException("Not implemented yet"); } diff --git a/core/src/main/scala/kafka/zk/ZkData.scala b/core/src/main/scala/kafka/zk/ZkData.scala index ed9a4f6c27e6a..e074e94d32bb5 100644 --- a/core/src/main/scala/kafka/zk/ZkData.scala +++ b/core/src/main/scala/kafka/zk/ZkData.scala @@ -76,7 +76,7 @@ object BrokersZNode { } object FederatedTopicsZNode { - def path = "/xinfraTopics" + def path = "/federatedTopics" } object PreferredControllersZNode { diff --git a/core/src/test/scala/unit/kafka/server/RequestQuotaTest.scala b/core/src/test/scala/unit/kafka/server/RequestQuotaTest.scala index fb242bed3152b..e5ee63cec9e5d 100644 --- a/core/src/test/scala/unit/kafka/server/RequestQuotaTest.scala +++ b/core/src/test/scala/unit/kafka/server/RequestQuotaTest.scala @@ -662,7 +662,7 @@ class RequestQuotaTest extends BaseRequestTest { new LiMoveControllerRequest.Builder(new LiMoveControllerRequestData(), ApiKeys.LI_MOVE_CONTROLLER.latestVersion) case ApiKeys.LI_FEDERATED_TOPIC_CREATE => - new LiFederatedTopicCreateRequest.Builder(new LiXinfraTopicCreateRequestData(), ApiKeys.LI_FEDERATED_TOPIC_CREATE.latestVersion) + new LiFederatedTopicCreateRequest.Builder(new LiFederatedTopicCreateRequestData(), ApiKeys.LI_FEDERATED_TOPIC_CREATE.latestVersion) case _ => throw new IllegalArgumentException("Unsupported API key " + apiKey)