This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e1652de  MINOR: Remove the InvalidTopicException handling in 
InternalTopicManager (#6167)
e1652de is described below

commit e1652de1198da66a7ee32241e63e137dd70c4cda
Author: Guozhang Wang <wangg...@gmail.com>
AuthorDate: Fri Jan 18 11:36:55 2019 -0800

    MINOR: Remove the InvalidTopicException handling in InternalTopicManager 
(#6167)
    
    Note we can only remove this handling in 2.2 but not in 2.1 since #6124 is 
only in 2.2.
    
    Reviewers: Bill Bejeck <b...@confluent.io>, Damian Guy 
<dam...@confluent.io>, Matthias J. Sax <matth...@confluent.io>
---
 .../kafka/streams/processor/internals/InternalTopicManager.java      | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
index ee7fd3e..f9fe042 100644
--- 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
+++ 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
@@ -23,7 +23,6 @@ import org.apache.kafka.clients.admin.DescribeTopicsResult;
 import org.apache.kafka.clients.admin.NewTopic;
 import org.apache.kafka.clients.admin.TopicDescription;
 import org.apache.kafka.common.KafkaFuture;
-import org.apache.kafka.common.errors.InvalidTopicException;
 import org.apache.kafka.common.errors.LeaderNotAvailableException;
 import org.apache.kafka.common.errors.TopicExistsException;
 import org.apache.kafka.common.errors.UnknownTopicOrPartitionException;
@@ -204,9 +203,7 @@ public class InternalTopicManager {
             } catch (final ExecutionException couldNotDescribeTopicException) {
                 final Throwable cause = 
couldNotDescribeTopicException.getCause();
                 if (cause instanceof UnknownTopicOrPartitionException ||
-                    cause instanceof LeaderNotAvailableException ||
-                    (cause instanceof InvalidTopicException &&
-                        cause.getMessage().equals("Topic " + topicName + " not 
found."))) {
+                    cause instanceof LeaderNotAvailableException) {
                     // This topic didn't exist or leader is not known yet, 
proceed to try to create it
                     log.debug("Topic {} is unknown or not found, hence not 
existed yet.", topicName);
                 } else {

Reply via email to