From ff95c8122a4b5f31d5038793bc0fb8028cf3a9f8 Mon Sep 17 00:00:00 2001 From: jqin Date: Fri, 14 Nov 2014 08:56:15 -0800 Subject: [PATCH 1/2] Modified doc for UnknownTopicOrPartitionException --- .../main/scala/kafka/common/UnknownTopicOrPartitionException.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala b/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala index 781e551..4b2e61e 100644 --- a/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala +++ b/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala @@ -17,7 +17,9 @@ package kafka.common /** - * Indicates an unknown topic or a partition id not between 0 and numPartitions-1 + * "Indicates one of the following situation: + * 1. Partition id is not between 0 and numPartitions-1 + * 2. Partition id for the topic does not exist on the broker (This could happen when partitions are reassigned)." */ class UnknownTopicOrPartitionException(message: String) extends RuntimeException(message) { def this() = this(null) -- 1.8.3.4 (Apple Git-47) From eaf1a63240bb4e80b02f55e8be86fb3205aa4d68 Mon Sep 17 00:00:00 2001 From: jqin Date: Wed, 19 Nov 2014 16:36:19 -0800 Subject: [PATCH 2/2] Addressed Guozhang's comments --- .../main/scala/kafka/common/UnknownTopicOrPartitionException.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala b/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala index 4b2e61e..f382d16 100644 --- a/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala +++ b/core/src/main/scala/kafka/common/UnknownTopicOrPartitionException.scala @@ -17,9 +17,9 @@ package kafka.common /** - * "Indicates one of the following situation: - * 1. Partition id is not between 0 and numPartitions-1 - * 2. Partition id for the topic does not exist on the broker (This could happen when partitions are reassigned)." + * Indicates one of the following situation: + * 1. Producer does not have the partition metadata for this id upon sending messages + * 2. Broker does not have the specified partition by id upon receiving messages */ class UnknownTopicOrPartitionException(message: String) extends RuntimeException(message) { def this() = this(null) -- 1.8.3.4 (Apple Git-47)