In 0.8, we support producing to a random partition if the key for produce
request is null. In this case, the producer picks a random partition to
send the messages to.

I agree that this functionality should not be in the log manager (it isn't
in 0.8 AFAICT). What do you want to delete from log manager in 0.8 ?

Thanks,
Neha

On Wed, Jul 18, 2012 at 10:17 AM, Jay Kreps <jay.kr...@gmail.com> wrote:

> Hey guys,
>
> We seem to have dropped the functionality to produce to a random partition
> by setting partition to -1 in 0.8. Presumably this is because we can no
> longer just choose a partition randomly, but need to pick a partition for
> which the given broker is a leader.
>
> Questions/Comments
> 1. Not sure if this was intentional or if the code just got dropped...
> 2. Arguably it would be nice to continue to support this functionality to
> allow a simple partition unaware producer, but I actually don't think it
> will work because there is no guarantee that a given broker is a leader for
> ANY partitions. So I think this functionality has to move into the
> producers (it isn't complex, but that means all producers must be partition
> aware).
> 3. Regardless this functionality should NOT have been in log manager, which
> is responsible for managing logs and shouldn't have business logic (like
> inferring that an invalid partition id means choosing a random partition).
> 4. I am deleting the random assignment stuff from log manager as part of
> KAFKA-371 since it isn't used and I don't think it can be used in 0.8
>
> Cheers,
>
> -Jay
>

Reply via email to