You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by sunil chaudhari <su...@gmail.com> on 2020/06/21 15:16:10 UTC

How to Change number of partitions without Rolling restart?

Hi,
I want to change number of partitions for all topics.
How can I change that? Is it server.properties which I need to change?
Then, in that case I have to restart broker right?

I checked from confluent control center, there is no option to change
partitions.

Please advise.

Regards,
Sunil

Re: How to Change number of partitions without Rolling restart?

Posted by Ma...@cognizant.com.
Or if you don’t want to automate then , use the excel sheet and generate below command for all topic .
Put all 350 statement in script and run it .



On 6/21/20, 9:28 PM, "Peter Bukowinski" <pm...@gmail.com> wrote:

    [External]


    You can’t use a wildcard and must address each topic individually. You can automate it with a for loop that takes an array/list of topics as the item to iterate over.

    -- Peter Bukowinski

    > On Jun 21, 2020, at 9:16 PM, sunil chaudhari <su...@gmail.com> wrote:
    >
    > Manoj,
    > You mean I have execute this command manually for all 350 Topics which I
    > already have?
    > Is there any possibility I can use any wild cards?
    >
    >
    >> On Mon, 22 Jun 2020 at 9:28 AM, <Ma...@cognizant.com> wrote:
    >>
    >> You can use below command to alter to partition
    >>
    >> ./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic my-topic
    >> --partitions 6
    >>
    >> Thanks
    >> Manoj
    >>
    >>
    >>
    >> On 6/21/20, 7:38 PM, "sunil chaudhari" <su...@gmail.com>
    >> wrote:
    >>
    >>    [External]
    >>
    >>
    >>    Hi,
    >>    I already have 350 topics created. Please guide me how can I do that
    >> for
    >>    these many topics?
    >>    Also I want each new topic to be created with more number partitions
    >>    automatically than previous number 3, which I had set in properties.
    >>
    >>    Regards,
    >>    Sunil.
    >>
    >>    On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <
    >>    liam.clarke@adscale.co.nz> wrote:
    >>
    >>> Hi Sunil,
    >>>
    >>> The broker setting num.partitions only applies to automatically
    >> created
    >>> topics (if that is enabled) at the time of creation. To change
    >> partitions
    >>> for a topic you need to use kafka-topics.sh to do so for each topic.
    >>>
    >>> Kind regards,
    >>>
    >>> Liam Clarke-Hutchinson
    >>>
    >>> On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <
    >>> sunilmchaudhari05@gmail.com>
    >>> wrote:
    >>>
    >>>> Hi,
    >>>> I want to change number of partitions for all topics.
    >>>> How can I change that? Is it server.properties which I need to
    >> change?
    >>>> Then, in that case I have to restart broker right?
    >>>>
    >>>> I checked from confluent control center, there is no option to
    >> change
    >>>> partitions.
    >>>>
    >>>> Please advise.
    >>>>
    >>>> Regards,
    >>>> Sunil
    >>>>
    >>>
    >>
    >>
    >> This e-mail and any files transmitted with it are for the sole use of the
    >> intended recipient(s) and may contain confidential and privileged
    >> information. If you are not the intended recipient(s), please reply to the
    >> sender and destroy all copies of the original message. Any unauthorized
    >> review, use, disclosure, dissemination, forwarding, printing or copying of
    >> this email, and/or any action taken in reliance on the contents of this
    >> e-mail is strictly prohibited and may be unlawful. Where permitted by
    >> applicable law, this e-mail and other e-mail communications sent to and
    >> from Cognizant e-mail addresses may be monitored.
    >> This e-mail and any files transmitted with it are for the sole use of the
    >> intended recipient(s) and may contain confidential and privileged
    >> information. If you are not the intended recipient(s), please reply to the
    >> sender and destroy all copies of the original message. Any unauthorized
    >> review, use, disclosure, dissemination, forwarding, printing or copying of
    >> this email, and/or any action taken in reliance on the contents of this
    >> e-mail is strictly prohibited and may be unlawful. Where permitted by
    >> applicable law, this e-mail and other e-mail communications sent to and
    >> from Cognizant e-mail addresses may be monitored.
    >>


This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

Re: How to Change number of partitions without Rolling restart?

Posted by Peter Bukowinski <pm...@gmail.com>.
You can’t use a wildcard and must address each topic individually. You can automate it with a for loop that takes an array/list of topics as the item to iterate over.

-- Peter Bukowinski

> On Jun 21, 2020, at 9:16 PM, sunil chaudhari <su...@gmail.com> wrote:
> 
> Manoj,
> You mean I have execute this command manually for all 350 Topics which I
> already have?
> Is there any possibility I can use any wild cards?
> 
> 
>> On Mon, 22 Jun 2020 at 9:28 AM, <Ma...@cognizant.com> wrote:
>> 
>> You can use below command to alter to partition
>> 
>> ./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic my-topic
>> --partitions 6
>> 
>> Thanks
>> Manoj
>> 
>> 
>> 
>> On 6/21/20, 7:38 PM, "sunil chaudhari" <su...@gmail.com>
>> wrote:
>> 
>>    [External]
>> 
>> 
>>    Hi,
>>    I already have 350 topics created. Please guide me how can I do that
>> for
>>    these many topics?
>>    Also I want each new topic to be created with more number partitions
>>    automatically than previous number 3, which I had set in properties.
>> 
>>    Regards,
>>    Sunil.
>> 
>>    On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <
>>    liam.clarke@adscale.co.nz> wrote:
>> 
>>> Hi Sunil,
>>> 
>>> The broker setting num.partitions only applies to automatically
>> created
>>> topics (if that is enabled) at the time of creation. To change
>> partitions
>>> for a topic you need to use kafka-topics.sh to do so for each topic.
>>> 
>>> Kind regards,
>>> 
>>> Liam Clarke-Hutchinson
>>> 
>>> On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <
>>> sunilmchaudhari05@gmail.com>
>>> wrote:
>>> 
>>>> Hi,
>>>> I want to change number of partitions for all topics.
>>>> How can I change that? Is it server.properties which I need to
>> change?
>>>> Then, in that case I have to restart broker right?
>>>> 
>>>> I checked from confluent control center, there is no option to
>> change
>>>> partitions.
>>>> 
>>>> Please advise.
>>>> 
>>>> Regards,
>>>> Sunil
>>>> 
>>> 
>> 
>> 
>> This e-mail and any files transmitted with it are for the sole use of the
>> intended recipient(s) and may contain confidential and privileged
>> information. If you are not the intended recipient(s), please reply to the
>> sender and destroy all copies of the original message. Any unauthorized
>> review, use, disclosure, dissemination, forwarding, printing or copying of
>> this email, and/or any action taken in reliance on the contents of this
>> e-mail is strictly prohibited and may be unlawful. Where permitted by
>> applicable law, this e-mail and other e-mail communications sent to and
>> from Cognizant e-mail addresses may be monitored.
>> This e-mail and any files transmitted with it are for the sole use of the
>> intended recipient(s) and may contain confidential and privileged
>> information. If you are not the intended recipient(s), please reply to the
>> sender and destroy all copies of the original message. Any unauthorized
>> review, use, disclosure, dissemination, forwarding, printing or copying of
>> this email, and/or any action taken in reliance on the contents of this
>> e-mail is strictly prohibited and may be unlawful. Where permitted by
>> applicable law, this e-mail and other e-mail communications sent to and
>> from Cognizant e-mail addresses may be monitored.
>> 

Re: How to Change number of partitions without Rolling restart?

Posted by sunil chaudhari <su...@gmail.com>.
Thanks all for this.
Las question around this.

If I write scripts for topics, I am afraid it will change partitions for
some default/internal system created topics which I don't want,
In that Case, I guess, I have to filter topic list first and then provide
it to the script...

 is that correct?


On Mon, 22 Jun 2020 at 9:59 AM, Liam Clarke-Hutchinson <
liam.clarke@adscale.co.nz> wrote:

> Hi Sunil,
>
> You'd want to do a bit of shell scripting for this.
>
> for topic in $(./kafka-topics.sh --bootstrap-server your-kafka-here:9092
> --list); do
>   ./kafka-topics.sh --bootstrap-server your-kafka-here:9092 --topic $topic
> --partitions X --alter
> done
>
> Etc. etc. And yep, to make sure further auto created topics have your
> desired partitions, you will need to change that property on the brokers
> and rolling restart.
>
> Cheers,
>
> Liam Clarke-Hutchinson
>
> On Mon, Jun 22, 2020 at 4:16 PM sunil chaudhari <
> sunilmchaudhari05@gmail.com>
> wrote:
>
> > Manoj,
> > You mean I have execute this command manually for all 350 Topics which I
> > already have?
> > Is there any possibility I can use any wild cards?
> >
> >
> > On Mon, 22 Jun 2020 at 9:28 AM, <Ma...@cognizant.com> wrote:
> >
> > > You can use below command to alter to partition
> > >
> > > ./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic
> my-topic
> > > --partitions 6
> > >
> > >  Thanks
> > > Manoj
> > >
> > >
> > >
> > > On 6/21/20, 7:38 PM, "sunil chaudhari" <su...@gmail.com>
> > > wrote:
> > >
> > >     [External]
> > >
> > >
> > >     Hi,
> > >     I already have 350 topics created. Please guide me how can I do
> that
> > > for
> > >     these many topics?
> > >     Also I want each new topic to be created with more number
> partitions
> > >     automatically than previous number 3, which I had set in
> properties.
> > >
> > >     Regards,
> > >     Sunil.
> > >
> > >     On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <
> > >     liam.clarke@adscale.co.nz> wrote:
> > >
> > >     > Hi Sunil,
> > >     >
> > >     > The broker setting num.partitions only applies to automatically
> > > created
> > >     > topics (if that is enabled) at the time of creation. To change
> > > partitions
> > >     > for a topic you need to use kafka-topics.sh to do so for each
> > topic.
> > >     >
> > >     > Kind regards,
> > >     >
> > >     > Liam Clarke-Hutchinson
> > >     >
> > >     > On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <
> > >     > sunilmchaudhari05@gmail.com>
> > >     > wrote:
> > >     >
> > >     > > Hi,
> > >     > > I want to change number of partitions for all topics.
> > >     > > How can I change that? Is it server.properties which I need to
> > > change?
> > >     > > Then, in that case I have to restart broker right?
> > >     > >
> > >     > > I checked from confluent control center, there is no option to
> > > change
> > >     > > partitions.
> > >     > >
> > >     > > Please advise.
> > >     > >
> > >     > > Regards,
> > >     > > Sunil
> > >     > >
> > >     >
> > >
> > >
> > > This e-mail and any files transmitted with it are for the sole use of
> the
> > > intended recipient(s) and may contain confidential and privileged
> > > information. If you are not the intended recipient(s), please reply to
> > the
> > > sender and destroy all copies of the original message. Any unauthorized
> > > review, use, disclosure, dissemination, forwarding, printing or copying
> > of
> > > this email, and/or any action taken in reliance on the contents of this
> > > e-mail is strictly prohibited and may be unlawful. Where permitted by
> > > applicable law, this e-mail and other e-mail communications sent to and
> > > from Cognizant e-mail addresses may be monitored.
> > > This e-mail and any files transmitted with it are for the sole use of
> the
> > > intended recipient(s) and may contain confidential and privileged
> > > information. If you are not the intended recipient(s), please reply to
> > the
> > > sender and destroy all copies of the original message. Any unauthorized
> > > review, use, disclosure, dissemination, forwarding, printing or copying
> > of
> > > this email, and/or any action taken in reliance on the contents of this
> > > e-mail is strictly prohibited and may be unlawful. Where permitted by
> > > applicable law, this e-mail and other e-mail communications sent to and
> > > from Cognizant e-mail addresses may be monitored.
> > >
> >
>

Re: How to Change number of partitions without Rolling restart?

Posted by Liam Clarke-Hutchinson <li...@adscale.co.nz>.
Hi Sunil,

You'd want to do a bit of shell scripting for this.

for topic in $(./kafka-topics.sh --bootstrap-server your-kafka-here:9092
--list); do
  ./kafka-topics.sh --bootstrap-server your-kafka-here:9092 --topic $topic
--partitions X --alter
done

Etc. etc. And yep, to make sure further auto created topics have your
desired partitions, you will need to change that property on the brokers
and rolling restart.

Cheers,

Liam Clarke-Hutchinson

On Mon, Jun 22, 2020 at 4:16 PM sunil chaudhari <su...@gmail.com>
wrote:

> Manoj,
> You mean I have execute this command manually for all 350 Topics which I
> already have?
> Is there any possibility I can use any wild cards?
>
>
> On Mon, 22 Jun 2020 at 9:28 AM, <Ma...@cognizant.com> wrote:
>
> > You can use below command to alter to partition
> >
> > ./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic my-topic
> > --partitions 6
> >
> >  Thanks
> > Manoj
> >
> >
> >
> > On 6/21/20, 7:38 PM, "sunil chaudhari" <su...@gmail.com>
> > wrote:
> >
> >     [External]
> >
> >
> >     Hi,
> >     I already have 350 topics created. Please guide me how can I do that
> > for
> >     these many topics?
> >     Also I want each new topic to be created with more number partitions
> >     automatically than previous number 3, which I had set in properties.
> >
> >     Regards,
> >     Sunil.
> >
> >     On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <
> >     liam.clarke@adscale.co.nz> wrote:
> >
> >     > Hi Sunil,
> >     >
> >     > The broker setting num.partitions only applies to automatically
> > created
> >     > topics (if that is enabled) at the time of creation. To change
> > partitions
> >     > for a topic you need to use kafka-topics.sh to do so for each
> topic.
> >     >
> >     > Kind regards,
> >     >
> >     > Liam Clarke-Hutchinson
> >     >
> >     > On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <
> >     > sunilmchaudhari05@gmail.com>
> >     > wrote:
> >     >
> >     > > Hi,
> >     > > I want to change number of partitions for all topics.
> >     > > How can I change that? Is it server.properties which I need to
> > change?
> >     > > Then, in that case I have to restart broker right?
> >     > >
> >     > > I checked from confluent control center, there is no option to
> > change
> >     > > partitions.
> >     > >
> >     > > Please advise.
> >     > >
> >     > > Regards,
> >     > > Sunil
> >     > >
> >     >
> >
> >
> > This e-mail and any files transmitted with it are for the sole use of the
> > intended recipient(s) and may contain confidential and privileged
> > information. If you are not the intended recipient(s), please reply to
> the
> > sender and destroy all copies of the original message. Any unauthorized
> > review, use, disclosure, dissemination, forwarding, printing or copying
> of
> > this email, and/or any action taken in reliance on the contents of this
> > e-mail is strictly prohibited and may be unlawful. Where permitted by
> > applicable law, this e-mail and other e-mail communications sent to and
> > from Cognizant e-mail addresses may be monitored.
> > This e-mail and any files transmitted with it are for the sole use of the
> > intended recipient(s) and may contain confidential and privileged
> > information. If you are not the intended recipient(s), please reply to
> the
> > sender and destroy all copies of the original message. Any unauthorized
> > review, use, disclosure, dissemination, forwarding, printing or copying
> of
> > this email, and/or any action taken in reliance on the contents of this
> > e-mail is strictly prohibited and may be unlawful. Where permitted by
> > applicable law, this e-mail and other e-mail communications sent to and
> > from Cognizant e-mail addresses may be monitored.
> >
>

RE: How to Change number of partitions without Rolling restart?

Posted by "JOHN, BIBIN" <bj...@att.com>.
Please execute by looping through your topic list. Change partition number based on your requirement.



for topic in `kafka-topics --zookeeper localhost:2181 --list`

./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic $topic --partition <partitionnumber>

done





-----Original Message-----
From: sunil chaudhari <su...@gmail.com>
Sent: Sunday, June 21, 2020 11:16 PM
To: users@kafka.apache.org
Subject: Re: How to Change number of partitions without Rolling restart?



Manoj,

You mean I have execute this command manually for all 350 Topics which I already have?

Is there any possibility I can use any wild cards?





On Mon, 22 Jun 2020 at 9:28 AM, <Ma...@cognizant.com>> wrote:



> You can use below command to alter to partition

>

> ./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic

> my-topic --partitions 6

>

>  Thanks

> Manoj

>

>

>

> On 6/21/20, 7:38 PM, "sunil chaudhari" <su...@gmail.com>>

> wrote:

>

>     [External]

>

>

>     Hi,

>     I already have 350 topics created. Please guide me how can I do

> that for

>     these many topics?

>     Also I want each new topic to be created with more number partitions

>     automatically than previous number 3, which I had set in properties.

>

>     Regards,

>     Sunil.

>

>     On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <

>     liam.clarke@adscale.co.nz<ma...@adscale.co.nz>> wrote:

>

>     > Hi Sunil,

>     >

>     > The broker setting num.partitions only applies to automatically

> created

>     > topics (if that is enabled) at the time of creation. To change

> partitions

>     > for a topic you need to use kafka-topics.sh to do so for each topic.

>     >

>     > Kind regards,

>     >

>     > Liam Clarke-Hutchinson

>     >

>     > On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <

>     > sunilmchaudhari05@gmail.com<ma...@gmail.com>>

>     > wrote:

>     >

>     > > Hi,

>     > > I want to change number of partitions for all topics.

>     > > How can I change that? Is it server.properties which I need to

> change?

>     > > Then, in that case I have to restart broker right?

>     > >

>     > > I checked from confluent control center, there is no option to

> change

>     > > partitions.

>     > >

>     > > Please advise.

>     > >

>     > > Regards,

>     > > Sunil

>     > >

>     >

>

>

> This e-mail and any files transmitted with it are for the sole use of

> the intended recipient(s) and may contain confidential and privileged

> information. If you are not the intended recipient(s), please reply to

> the sender and destroy all copies of the original message. Any

> unauthorized review, use, disclosure, dissemination, forwarding,

> printing or copying of this email, and/or any action taken in reliance

> on the contents of this e-mail is strictly prohibited and may be

> unlawful. Where permitted by applicable law, this e-mail and other

> e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

> This e-mail and any files transmitted with it are for the sole use of

> the intended recipient(s) and may contain confidential and privileged

> information. If you are not the intended recipient(s), please reply to

> the sender and destroy all copies of the original message. Any

> unauthorized review, use, disclosure, dissemination, forwarding,

> printing or copying of this email, and/or any action taken in reliance

> on the contents of this e-mail is strictly prohibited and may be

> unlawful. Where permitted by applicable law, this e-mail and other

> e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

>

Re: How to Change number of partitions without Rolling restart?

Posted by sunil chaudhari <su...@gmail.com>.
Manoj,
You mean I have execute this command manually for all 350 Topics which I
already have?
Is there any possibility I can use any wild cards?


On Mon, 22 Jun 2020 at 9:28 AM, <Ma...@cognizant.com> wrote:

> You can use below command to alter to partition
>
> ./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic my-topic
> --partitions 6
>
>  Thanks
> Manoj
>
>
>
> On 6/21/20, 7:38 PM, "sunil chaudhari" <su...@gmail.com>
> wrote:
>
>     [External]
>
>
>     Hi,
>     I already have 350 topics created. Please guide me how can I do that
> for
>     these many topics?
>     Also I want each new topic to be created with more number partitions
>     automatically than previous number 3, which I had set in properties.
>
>     Regards,
>     Sunil.
>
>     On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <
>     liam.clarke@adscale.co.nz> wrote:
>
>     > Hi Sunil,
>     >
>     > The broker setting num.partitions only applies to automatically
> created
>     > topics (if that is enabled) at the time of creation. To change
> partitions
>     > for a topic you need to use kafka-topics.sh to do so for each topic.
>     >
>     > Kind regards,
>     >
>     > Liam Clarke-Hutchinson
>     >
>     > On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <
>     > sunilmchaudhari05@gmail.com>
>     > wrote:
>     >
>     > > Hi,
>     > > I want to change number of partitions for all topics.
>     > > How can I change that? Is it server.properties which I need to
> change?
>     > > Then, in that case I have to restart broker right?
>     > >
>     > > I checked from confluent control center, there is no option to
> change
>     > > partitions.
>     > >
>     > > Please advise.
>     > >
>     > > Regards,
>     > > Sunil
>     > >
>     >
>
>
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be unlawful. Where permitted by
> applicable law, this e-mail and other e-mail communications sent to and
> from Cognizant e-mail addresses may be monitored.
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be unlawful. Where permitted by
> applicable law, this e-mail and other e-mail communications sent to and
> from Cognizant e-mail addresses may be monitored.
>

Re: How to Change number of partitions without Rolling restart?

Posted by Ma...@cognizant.com.
You can use below command to alter to partition

./bin/kafka-topics.sh --alter --zookeeper localhost:2181 --topic my-topic --partitions 6

 Thanks
Manoj



On 6/21/20, 7:38 PM, "sunil chaudhari" <su...@gmail.com> wrote:

    [External]


    Hi,
    I already have 350 topics created. Please guide me how can I do that for
    these many topics?
    Also I want each new topic to be created with more number partitions
    automatically than previous number 3, which I had set in properties.

    Regards,
    Sunil.

    On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <
    liam.clarke@adscale.co.nz> wrote:

    > Hi Sunil,
    >
    > The broker setting num.partitions only applies to automatically created
    > topics (if that is enabled) at the time of creation. To change partitions
    > for a topic you need to use kafka-topics.sh to do so for each topic.
    >
    > Kind regards,
    >
    > Liam Clarke-Hutchinson
    >
    > On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <
    > sunilmchaudhari05@gmail.com>
    > wrote:
    >
    > > Hi,
    > > I want to change number of partitions for all topics.
    > > How can I change that? Is it server.properties which I need to change?
    > > Then, in that case I have to restart broker right?
    > >
    > > I checked from confluent control center, there is no option to change
    > > partitions.
    > >
    > > Please advise.
    > >
    > > Regards,
    > > Sunil
    > >
    >


This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

Re: How to Change number of partitions without Rolling restart?

Posted by sunil chaudhari <su...@gmail.com>.
Hi,
I already have 350 topics created. Please guide me how can I do that for
these many topics?
Also I want each new topic to be created with more number partitions
automatically than previous number 3, which I had set in properties.

Regards,
Sunil.

On Mon, 22 Jun 2020 at 6:31 AM, Liam Clarke-Hutchinson <
liam.clarke@adscale.co.nz> wrote:

> Hi Sunil,
>
> The broker setting num.partitions only applies to automatically created
> topics (if that is enabled) at the time of creation. To change partitions
> for a topic you need to use kafka-topics.sh to do so for each topic.
>
> Kind regards,
>
> Liam Clarke-Hutchinson
>
> On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <
> sunilmchaudhari05@gmail.com>
> wrote:
>
> > Hi,
> > I want to change number of partitions for all topics.
> > How can I change that? Is it server.properties which I need to change?
> > Then, in that case I have to restart broker right?
> >
> > I checked from confluent control center, there is no option to change
> > partitions.
> >
> > Please advise.
> >
> > Regards,
> > Sunil
> >
>

Re: How to Change number of partitions without Rolling restart?

Posted by Liam Clarke-Hutchinson <li...@adscale.co.nz>.
Hi Sunil,

The broker setting num.partitions only applies to automatically created
topics (if that is enabled) at the time of creation. To change partitions
for a topic you need to use kafka-topics.sh to do so for each topic.

Kind regards,

Liam Clarke-Hutchinson

On Mon, Jun 22, 2020 at 3:16 AM sunil chaudhari <su...@gmail.com>
wrote:

> Hi,
> I want to change number of partitions for all topics.
> How can I change that? Is it server.properties which I need to change?
> Then, in that case I have to restart broker right?
>
> I checked from confluent control center, there is no option to change
> partitions.
>
> Please advise.
>
> Regards,
> Sunil
>