You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "huxihx (JIRA)" <ji...@apache.org> on 2017/06/10 02:04:19 UTC

[jira] [Commented] (KAFKA-5418) ZkUtils.getAllPartitions() may fail if a topic is marked for deletion

    [ https://issues.apache.org/jira/browse/KAFKA-5418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045321#comment-16045321 ] 

huxihx commented on KAFKA-5418:
-------------------------------

Is it a duplicate of [KAFKA-1019|https://issues.apache.org/jira/browse/KAFKA-1019]?

> ZkUtils.getAllPartitions() may fail if a topic is marked for deletion
> ---------------------------------------------------------------------
>
>                 Key: KAFKA-5418
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5418
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.9.0.1, 0.10.2.1
>            Reporter: Edoardo Comar
>
> Running {{ZkUtils.getAllPartitions()}} on a cluster which had a topic stuck in the 'marked for deletion' state 
> so it was a child of {{/brokers/topics}}
> but it had no children, i.e. the path {{/brokers/topics/thistopic/partitions}}
> did not exist, throws a ZkNoNodeException while iterating:
> {noformat}
> rg.I0Itec.zkclient.exception.ZkNoNodeException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /brokers/topics/xyzblahfoo/partitions
> 	at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:47)
> 	at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:995)
> 	at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:675)
> 	at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:671)
> 	at kafka.utils.ZkUtils.getChildren(ZkUtils.scala:537)
> 	at kafka.utils.ZkUtils$$anonfun$getAllPartitions$1.apply(ZkUtils.scala:817)
> 	at kafka.utils.ZkUtils$$anonfun$getAllPartitions$1.apply(ZkUtils.scala:816)
> 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
> 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
> 	at scala.collection.Iterator$class.foreach(Iterator.scala:742)
> 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
> 	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
> 	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
> 	at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
> 	at scala.collection.AbstractTraversable.map(Traversable.scala:104)
> 	at kafka.utils.ZkUtils.getAllPartitions(ZkUtils.scala:816)
> ...
> 	at java.lang.Thread.run(Thread.java:809)
> Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /brokers/topics/xyzblahfoo/partitions
> 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
> 	at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
> 	at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1472)
> 	at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1500)
> 	at org.I0Itec.zkclient.ZkConnection.getChildren(ZkConnection.java:114)
> 	at org.I0Itec.zkclient.ZkClient$4.call(ZkClient.java:678)
> 	at org.I0Itec.zkclient.ZkClient$4.call(ZkClient.java:675)
> 	at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:985)
> 	... 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)