You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Yu, Libo " <li...@citi.com> on 2013/10/19 16:43:26 UTC
key partitioner
Hi team,
According to the document, the default partitioner hashes the key string and assign the message
to a broker. Could you give a brief introduction to the hash algorithm? If a long timestamp (in hex format)
is used as key, will the messages be distributed evenly to all partitions? Assume the timestamp increases
on a one millisecond basis.
Regards,
Libo
Re: key partitioner
Posted by Neha Narkhede <ne...@gmail.com>.
It hashes the key and mods it by the number of partitions, not brokers.
Thanks,
Neha
On Oct 19, 2013 7:44 AM, "Yu, Libo" <li...@citi.com> wrote:
> Hi team,
>
> According to the document, the default partitioner hashes the key string
> and assign the message
> to a broker. Could you give a brief introduction to the hash algorithm?
> If a long timestamp (in hex format)
> is used as key, will the messages be distributed evenly to all partitions?
> Assume the timestamp increases
> on a one millisecond basis.
>
> Regards,
>
> Libo
>
>