You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Abhishek Bhattacharjee <ab...@gmail.com> on 2014/01/31 16:57:13 UTC

[Keeping equal no of messages in partitions ]

I want to store equal no.of messages in partitions. For eg. if I have 100
messages and 2 partitions for a topic then each partition should have 50
messages.
Can someone help me with this I am new to kafka so any help will be
appreciated.

Thanks,
-- 
*Abhishek Bhattacharjee*
*Pune Institute of Computer Technology*

Re: [Keeping equal no of messages in partitions ]

Posted by Abhishek Bhattacharjee <ab...@gmail.com>.
Thanks for that :-)


On Sun, Feb 2, 2014 at 12:17 AM, Neha Narkhede <ne...@gmail.com>wrote:

> Thanks for updating the FAQ, Guozhang!
>
>
> On Sat, Feb 1, 2014 at 10:32 AM, Guozhang Wang <wa...@gmail.com> wrote:
>
> > Update the FAQ wiki page for this question:
> >
> >
> >
> https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-Whydataisnotevenlydistributedamongpartitionswhenpartitioningkeyisnotspecified
> > ?
> >
> >
> > On Fri, Jan 31, 2014 at 8:53 PM, Jun Rao <ju...@gmail.com> wrote:
> >
> > > You can use a customized partitioner and provide a partitioning key in
> > each
> > > message.
> > >
> > > Thanks,
> > >
> > > Jun
> > >
> > >
> > > On Fri, Jan 31, 2014 at 7:57 AM, Abhishek Bhattacharjee <
> > > abhishek.bhattacharjee11@gmail.com> wrote:
> > >
> > > > I want to store equal no.of messages in partitions. For eg. if I have
> > 100
> > > > messages and 2 partitions for a topic then each partition should have
> > 50
> > > > messages.
> > > > Can someone help me with this I am new to kafka so any help will be
> > > > appreciated.
> > > >
> > > > Thanks,
> > > > --
> > > > *Abhishek Bhattacharjee*
> > > > *Pune Institute of Computer Technology*
> > > >
> > >
> >
> >
> >
> > --
> > -- Guozhang
> >
>



-- 
*Abhishek Bhattacharjee*
*Pune Institute of Computer Technology*

Re: [Keeping equal no of messages in partitions ]

Posted by Neha Narkhede <ne...@gmail.com>.
Thanks for updating the FAQ, Guozhang!


On Sat, Feb 1, 2014 at 10:32 AM, Guozhang Wang <wa...@gmail.com> wrote:

> Update the FAQ wiki page for this question:
>
>
> https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-Whydataisnotevenlydistributedamongpartitionswhenpartitioningkeyisnotspecified
> ?
>
>
> On Fri, Jan 31, 2014 at 8:53 PM, Jun Rao <ju...@gmail.com> wrote:
>
> > You can use a customized partitioner and provide a partitioning key in
> each
> > message.
> >
> > Thanks,
> >
> > Jun
> >
> >
> > On Fri, Jan 31, 2014 at 7:57 AM, Abhishek Bhattacharjee <
> > abhishek.bhattacharjee11@gmail.com> wrote:
> >
> > > I want to store equal no.of messages in partitions. For eg. if I have
> 100
> > > messages and 2 partitions for a topic then each partition should have
> 50
> > > messages.
> > > Can someone help me with this I am new to kafka so any help will be
> > > appreciated.
> > >
> > > Thanks,
> > > --
> > > *Abhishek Bhattacharjee*
> > > *Pune Institute of Computer Technology*
> > >
> >
>
>
>
> --
> -- Guozhang
>

Re: [Keeping equal no of messages in partitions ]

Posted by Guozhang Wang <wa...@gmail.com>.
Update the FAQ wiki page for this question:

https://cwiki.apache.org/confluence/display/KAFKA/FAQ#FAQ-Whydataisnotevenlydistributedamongpartitionswhenpartitioningkeyisnotspecified
?


On Fri, Jan 31, 2014 at 8:53 PM, Jun Rao <ju...@gmail.com> wrote:

> You can use a customized partitioner and provide a partitioning key in each
> message.
>
> Thanks,
>
> Jun
>
>
> On Fri, Jan 31, 2014 at 7:57 AM, Abhishek Bhattacharjee <
> abhishek.bhattacharjee11@gmail.com> wrote:
>
> > I want to store equal no.of messages in partitions. For eg. if I have 100
> > messages and 2 partitions for a topic then each partition should have 50
> > messages.
> > Can someone help me with this I am new to kafka so any help will be
> > appreciated.
> >
> > Thanks,
> > --
> > *Abhishek Bhattacharjee*
> > *Pune Institute of Computer Technology*
> >
>



-- 
-- Guozhang

Re: [Keeping equal no of messages in partitions ]

Posted by Jun Rao <ju...@gmail.com>.
You can use a customized partitioner and provide a partitioning key in each
message.

Thanks,

Jun


On Fri, Jan 31, 2014 at 7:57 AM, Abhishek Bhattacharjee <
abhishek.bhattacharjee11@gmail.com> wrote:

> I want to store equal no.of messages in partitions. For eg. if I have 100
> messages and 2 partitions for a topic then each partition should have 50
> messages.
> Can someone help me with this I am new to kafka so any help will be
> appreciated.
>
> Thanks,
> --
> *Abhishek Bhattacharjee*
> *Pune Institute of Computer Technology*
>