kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Rao <jun...@gmail.com>
Subject Re: Partitioning
Date Sat, 03 Dec 2011 06:34:42 GMT
kafka.producer.Partitioner

Jun

On Fri, Dec 2, 2011 at 9:41 PM, Mark <static.void.dev@gmail.com> wrote:

> Can you point me to that class?
>
>
> On 12/2/11 6:04 PM, Neha Narkhede wrote:
>
>> Are producers responsible for determining which partition to write to or
>>>>
>>> is this handled by the broker?
>>
>> This decision happens on the producer.
>>
>>  If its not automatically handled by the broker, how do people usually go
>>>>
>>> about deciding which partition to write to.. simple hashing?
>>
>> The following describes the default behavior -
>>
>> If you provide a key, it selects using hash(key)%num_partitions. If you
>> don't provide a key, it simply defaults to random partition on a random
>> broker.
>>
>> If you also plug in your custom partitioner to the producer.
>>
>> Thanks,
>> Neha
>>
>> On Fri, Dec 2, 2011 at 5:58 PM, Mark<static.void.dev@gmail.com**>  wrote:
>>
>>  Are producers responsible for determining which partition to write to or
>>> is this handled by the broker?
>>>
>>> If its not automatically handled by the broker, how do people usually go
>>> about deciding which partition to write to.. simple hashing?
>>>
>>>
>>>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message