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

Vivek Madani commented on KAFKA-1737:
-------------------------------------

Hi - Did you mean to enforce ZkStringSerializer on the ZkClient instance passed 
to AdminUtils.createTopic? Or you meant changing ZkClient from 
org.I0Itec.zkclient.ZkClient? 

If I understand this correctly, since AdminUtils are user-facing, user can 
create ZkClient instance outside and pass it on to AdminUtils. Do you suggest 
providing an overload in AdminUtils that takes parameters required to construct 
ZkClient internally and set ZkStringSerializer for that? In this case, doc 
update may still be required in case someone intends to use the overload which 
takes ZkClient. Or we just set ZkStringSerializer for the instance of ZkClient 
passed to AdminUtils.

There are many places where "new ZkClient" is called within kafka code-base and 
your suggestion to have a createZkClient will help but we may need a different 
mechanism for AdminUtils. I am saying this based on my limited understanding of 
the Kafka code-base - correct me if I am missing out anything.

> Document required ZkSerializer for ZkClient used with AdminUtils
> ----------------------------------------------------------------
>
>                 Key: KAFKA-1737
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1737
>             Project: Kafka
>          Issue Type: Improvement
>          Components: tools
>    Affects Versions: 0.8.1.1
>            Reporter: Stevo Slavic
>            Priority: Minor
>
> {{ZkClient}} instances passed to {{AdminUtils}} calls must have 
> {{kafka.utils.ZKStringSerializer}} set as {{ZkSerializer}}. Otherwise 
> commands executed via {{AdminUtils}} may not be seen/recognizable to broker, 
> producer or consumer. E.g. producer (with auto topic creation turned off) 
> will not be able to send messages to a topic created via {{AdminUtils}}, it 
> will throw {{UnknownTopicOrPartitionException}}.
> Please consider at least documenting this requirement in {{AdminUtils}} 
> scaladoc.
> For more info see [related discussion on Kafka user mailing 
> list|http://mail-archives.apache.org/mod_mbox/kafka-users/201410.mbox/%3CCAAUywg-oihNiXuQRYeS%3D8Z3ymsmEHo6ghLs%3Dru4nbm%2BdHVz6TA%40mail.gmail.com%3E].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to