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
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
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
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
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
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
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
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
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,