Re: Explicit topic creation and topic metadata availability

2014-10-29 Thread Stevo Slavić
Created https://issues.apache.org/jira/browse/KAFKA-1737 Thanks for support! Kind regards, Stevo Slavic. On Tue, Oct 28, 2014 at 2:07 AM, Guozhang Wang wrote: > I think AdminUtils just take a zkClient as its parameter, and the zkClient > should setZkSerializer at the time when it is initialize

Re: Explicit topic creation and topic metadata availability

2014-10-27 Thread Guozhang Wang
I think AdminUtils just take a zkClient as its parameter, and the zkClient should setZkSerializer at the time when it is initialized. You can take a look at TopicCommand, which triggers AdminUtils.createTopic by initializing a zkClient and pass it in. I agree that we probably have to make it clear

Re: Explicit topic creation and topic metadata availability

2014-10-27 Thread Stevo Slavić
OK, thanks for heads up! Is this requirement documented somewhere? Would it make sense then to have AdminUtils, call setZkSerializer on zkClient passed to it? Or maybe provide a factory method(s) for ZkClient in AdminUtils, which would ensure ZkSerializer is appropriate. Kind regards, Stevo Sla

Re: Explicit topic creation and topic metadata availability

2014-10-26 Thread Guozhang Wang
Hi Stevo, Sorry for the late reply. Yes, you have to use ZKStringSerializer when initializing zkClient. However this is not related to key.serializer.class of the producer (not the KafkaProducer, which is the new producer that does not need any key serializer any more). key.serializer.class and

Re: Explicit topic creation and topic metadata availability

2014-10-22 Thread Stevo Slavić
It seems that used ZkSerializer has to be aligned with KafkaProducer configured key.serializer.class. On Thu, Oct 23, 2014 at 1:13 AM, Stevo Slavić wrote: > Still have to understand what is going on, but when I set > kafka.utils.ZKStringSerializer to be ZkSerializer for ZkClient used in > AdminU

Re: Explicit topic creation and topic metadata availability

2014-10-22 Thread Stevo Slavić
Still have to understand what is going on, but when I set kafka.utils.ZKStringSerializer to be ZkSerializer for ZkClient used in AdminUtils calls, KafkaProducer could see created topic... Default ZkSerializer is org.I0Itec.zkclient.serialize.SerializableSerializer. Kind regards, Stevo Slavic. On

Re: Explicit topic creation and topic metadata availability

2014-10-22 Thread Stevo Slavić
Output on trunk is clean too, after clean build: ~/git/oss/kafka [trunk|✔] 22:00 $ bin/kafka-topics.sh --zookeeper 127.0.0.1:50194 --topic 059915e6-56ef-4b8e-8e95-9f676313a01c --describe Error while executing topic command next on empty iterator java.util.NoSuchElementException: next on empty iter

Re: Explicit topic creation and topic metadata availability

2014-10-22 Thread Stevo Slavić
kafka-topics.sh execution, from latest trunk: ~/git/oss/kafka [trunk|✔] 21:00 $ bin/kafka-topics.sh --zookeeper 127.0.0.1:50194 --topic 059915e6-56ef-4b8e-8e95-9f676313a01c --describe SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/d062007/git/oss/kafka

Re: Explicit topic creation and topic metadata availability

2014-10-22 Thread Guozhang Wang
Hello Stevo, Your understanding about the configs are correct, and it is indeed wired that the producer gets the exception after topic is created. Could you use the kafka-topics command to check if the leaders exist? kafka-topics.sh --zookeeper XXX --topic [topic-name] describe Guozhang On Wed,

Explicit topic creation and topic metadata availability

2014-10-22 Thread Stevo Slavić
Hello Apache Kafka users, Using Kafka 0.8.1.1 (single instance with single ZK 3.4.6 running locally), with auto topic creation disabled, in a test I have topic created with AdminUtils.createTopic (AdminUtils.topicExists returns true) but KafkaProducer on send request keeps throwing UnknownTopicOrP