You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/10/29 14:29:33 UTC

[GitHub] [kafka] lbradstreet commented on a change in pull request #9473: KAFKA-10545: Create topic IDs in ZooKeeper and Controller

lbradstreet commented on a change in pull request #9473:
URL: https://github.com/apache/kafka/pull/9473#discussion_r514302473



##########
File path: core/src/main/scala/kafka/controller/ControllerContext.scala
##########
@@ -126,6 +130,26 @@ class ControllerContext {
     replicaStates.clear()
   }
 
+  def addTopicId(topic: String, id: UUID): Unit = {
+    if (!allTopics.contains(topic))
+      throw new IllegalStateException("topic " + topic +  " is not contained in all topics.")

Review comment:
       We can use string interpolation with these to make them a little bit neater e.g. `s"topic $topic is not contained in all topics"`.




----------------------------------------------------------------
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:
users@infra.apache.org