[ https://issues.apache.org/jira/browse/KAFKA-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14255816#comment-14255816 ]
Jason Kania edited comment on KAFKA-1817 at 12/22/14 3:15 PM: -------------------------------------------------------------- Here is my exact code which does not work to create the proper partitions: ZkClient zookeeperClient = new ZkClient( "192.168.10.4:2181" ); if (!AdminUtils.topicExists( zookeeperClient, "foshizzle" )) { AdminUtils.createTopic( zookeeperClient, "foshizzle", 8, 1, new Properties() ); } I did not do anything special although I see you called without the properties and I do not see this method available to me in the 0.8.2 code. I am using the jars: kafka-clients-0.8.2-beta.jar kafka_2.9.2-0.8.2-beta.jar was (Author: longtimer): Here is my exact code which does not work to create the proper partitions: ZkClient zookeeperClient = new ZkClient( "192.168.10.4:2181" ); if (!AdminUtils.topicExists( zookeeperClient, "foshizzle" )) { AdminUtils.createTopic( zookeeperClient, "foshizzle", 8, 1, new Properties() ); } I did not do anything special although I see you called without the properties and I do not see this method available to me in the 0.8.2 code. > AdminUtils.createTopic vs kafka-topics.sh --create with partitions > ------------------------------------------------------------------ > > Key: KAFKA-1817 > URL: https://issues.apache.org/jira/browse/KAFKA-1817 > Project: Kafka > Issue Type: Sub-task > Affects Versions: 0.8.2 > Environment: debian linux current version up to date > Reporter: Jason Kania > Fix For: 0.8.3 > > > When topics are created using AdminUtils.createTopic in code, no partitions > folder is created The zookeeper shell shows this. > ls /brokers/topics/foshizzle > [] > However, when kafka-topics.sh --create is run, the partitions folder is > created: > ls /brokers/topics/foshizzle > [partitions] > The unfortunately useless error message "KeeperErrorCode = NoNode for > /brokers/topics/periodicReading/partitions" makes it unclear what to do. When > the topics are listed via kafka-topics.sh, they appear to have been created > fine. It would be good if the exception was wrapped by Kafka to suggested > looking in the zookeeper shell so a person didn't have to dig around to > understand what the meaning of this path is... -- This message was sent by Atlassian JIRA (v6.3.4#6332)