Skip to content

Commit

Permalink
yet other namings
Browse files Browse the repository at this point in the history
  • Loading branch information
kehuum committed Oct 26, 2023
1 parent 1da09f6 commit 63e0102
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ default CreateTopicsResult createTopics(Collection<NewTopic> newTopics) {
*/
CreateTopicsResult createTopics(Collection<NewTopic> newTopics, CreateTopicsOptions options);

default CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> xinfraTopics) {
return createFederatedTopicsZnode(xinfraTopics, new CreateFederatedTopicsZnodeOptions());
default CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> federatedTopics) {
return createFederatedTopicsZnode(federatedTopics, new CreateFederatedTopicsZnodeOptions());
}

CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> xinfraTopics,
CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> federatedTopics,
CreateFederatedTopicsZnodeOptions options);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1600,12 +1600,12 @@ public CreateTopicsResult createTopics(final Collection<NewTopic> newTopics,
}

@Override
public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(final Map<String, String> xinfraTopics,
public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(final Map<String, String> federatedTopics,
final CreateFederatedTopicsZnodeOptions options) {
final Map<String, KafkaFutureImpl<Void>> topicFutures = new HashMap<>(xinfraTopics.size());
final Map<String, KafkaFutureImpl<Void>> topicFutures = new HashMap<>(federatedTopics.size());
final long now = time.milliseconds();
List<LiFederatedTopicCreateRequestData.FederatedTopics> 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<>());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public CreateTopicsResult createTopics(Collection<NewTopic> newTopics, CreateTop
}

@Override
public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> xinfraTopics,
public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> federatedTopics,
CreateFederatedTopicsZnodeOptions options) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ synchronized public CreateTopicsResult createTopics(Collection<NewTopic> newTopi
}

@Override
public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> xinfraTopics,
public CreateOrDeleteFederatedTopicsZnodeResult createFederatedTopicsZnode(Map<String, String> federatedTopics,
CreateFederatedTopicsZnodeOptions options) {
throw new UnsupportedOperationException("Not implemented yet");
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/kafka/zk/ZkData.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ object BrokersZNode {
}

object FederatedTopicsZNode {
def path = "/xinfraTopics"
def path = "/federatedTopics"
}

object PreferredControllersZNode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 63e0102

Please sign in to comment.