Kafka how to reset number of partitions in a topics

I wanted to figure out how to reset number of partitions in my topic in Kafka and I followed these steps
  1. I did create a sample topic called my-topic with single partition
    
    spatil$ bin/kafka-topics.sh --create --zookeeper localhost:2181 --topic my-topic --replication-factor 1 --partitions 1
    Created topic "my-topic".
    
  2. I used describe command to verify that my topic has actually single partition
    
    spatil$ bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic my-topic
    Topic:my-topic PartitionCount:1 ReplicationFactor:1 Configs:
     Topic: my-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
    
  3. Then I did execute alter command on my partition and changed number of partitions from 1 to 3
    
    spatil$ bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic my-topic --partitions 3
    WARNING: If partitions are increased for a topic that has a key, the partition logic or ordering of the messages will be affected
    Adding partitions succeeded!
    
  4. I did execute describe command on my topic to verify that it actually has 3 topics
    
    spatil$ bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic my-topic
    Topic:my-topic PartitionCount:3 ReplicationFactor:1 Configs:
     Topic: my-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
     Topic: my-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0
     Topic: my-topic Partition: 2 Leader: 0 Replicas: 0 Isr: 0
    

37 comments:

Tejuteju said...

very informative blog and useful article thank you for sharing with us, keep posting Big data hadoop online Course Hyderabad

Unknown said...

Great blog..its really informative..Thanks for sharing..keep update php training in chennai
php training in velachery chennai
php course fees in chennai
best php training institute in chennai

Dharani M said...

Nice information
sas training in Marathahalli

sas training institutes in Marathahalli

xcod4r said...

Learning Code Examples
learn java with examples

rohini said...

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
apple iphone service center in chennai | Mac book pro service center in chennai | ipod service center in chennai | apple ipad service center in chennai

Segment Web said...

Good Post. I appreatiate this.

If you want to logo designing services than visit - Logo Designing Services Jaipur | Logo Designer in Jaipur | Logo maker in Jaipur

swapna sri said...

Thank You! For sharing such a great article, It’s been an amazing article.It provides lot’s of information, I really enjoyed to read this, I hope, I will get these kinds of information on a regular basis from your side.
apps development company in bangalore
mobile application development companies in India
Blockchain application development in Bangalore
React native apps development companies

safracatz said...

Hi
Thanks for sharing Nice information, It's a great article
It provides a lot of information

Apps Development Company in Nigeria
App Development Companies in Zambia
Apps Development Company in South Africa

Naaz Aniqua said...

I am having such a good time on this wonderful post and I think it is good to have this post here. Thanks for sharing this wonderful post here.
app development companies in Indianapolis

iphone apps development companies Indianapolis

Blockchain Development Company in Indianapolis

iot companies Indianapolis

AI Company in Indianapolis

4 Square Logic said...

Thanks for sharing Information.Must visit at top android mobile app development company with best quality work.

lisa gray said...

i am a mobile app creator Australia i love to learn about Tech it helps me to grow my skills.

abhi said...

Nice blog Thank you.

Website Designing Internship Internship in Bangalore

Internship Program

Web Development Internship in Bangalore

super hero said...

We at Strive 2 drive,driving school In Melbourne. Driving School in Melbourne!
Driving School in Melbourne!
is one of the best & safe driving school where you have an ease of access
to a wide array of special driving features. We are focused at your
comfort and so we have put together facilities within the site to ensure
that you get the very best. Driving School in Melbourne!

super hero said...
This comment has been removed by the author.
Arif Sarkar said...

Thanks for sharing this blog. This is really amazing information.

Arkon Web Solutions is one of the best website design company in himatnagar. As stated we have the best in-house team to take complete responsibility of your Web designing services needs and that too in the best possible way with the use of latest technology.

Naaz Aniqua said...

Hi, I like your blog. There is a lot of good information on this blog, I loved reading it and I think people will get a lot of support from this blog.

Blockchain application development in california

Best Mobile App Development Companies Los Angeles

Blockchain Application Development in Los Angeles

Best Mobile App Development Companies New York

AI Company in New York

Kate said...

Nowadays all business find for seo company who provides seo service that can target various types of searches, including image search, video search, educational search, news search, and vertical search engines relevant to the industry.
-------------------------

Wxit Consultant Services said...

Thank you for sharing your thoughts and knowledge on this topic. This is really helpful and informative.

If you want to make custom website & application you can contact us on our Web Design Company and Ecommerce Web Design Company anytime.

Henry V. Adkins said...

"Nice post! Thanks for sharing valuable article.
Please Visit our Website supply chain"

Henry V. Adkins said...

"Nice post! Thanks for sharing valuable article.
Please Visit our Website Incoterms"

Globalior said...
This comment has been removed by the author.
tejaswini said...

This is a great post I saw thanks to sharing. I really want to hope that you will continue to share great posts in the future.
data science course

360DigiTMG said...

I see the best substance on your blog and I unbelievably love getting them. 360DigiTMG

dataanalyticscourse said...

Here at this site actually the particular material assortment with the goal that everyone can appreciate a great deal.
360DigiTMG big data training

Unknown said...

Bayzat is redefining the work life experience,
health insurance dubai
medical insurance dubai
making automated HR, payroll, employee benefits and insurance a possibility for all businesses in UAE.

Thomas Armstrong said...

ou have shared a great useful information. Appslure is Mobile App Development Company in USA

Unknown said...

Nice Blog ,your blog is sharing unique information.... Where is Beard Transplantation Performed

Unknown said...

Thanks for provide great informatic and looking beautiful blog Get Best Plumbing Services Singapore near you within 90 minutes with 30-day post-service According to superstition, a leaking pipe or tap means your finances will flow out of the house.

360DigiTMGAurangabad said...

Excellence blog! Thanks For Sharing, The information provided by you is really a worthy. I read this blog and I got the more information about
data scientist courses aurangabad

BroddyAdams said...


I feel that is among the such a lot vital info for me. And i'm happy studying your article. However wanna commentary on few normal things, The website taste is great, the articles is in reality excellent : D. Good process, cheers.
shipping container sizes

Unknown said...

Fantastic website! You created an outstanding website! Keep up the fantastic work
UI/UX Design Company in Chennai
mobile app development in chennai
top mobile app development companies in chennai
Digital Marketing Company in chennai
Digital marketing Services in chennai

Esthacki said...

Thanks for sharing this great information.
bulk sms marketing chennai
bulk sms service chennai
promotional sms chennai
sms marketing chennai
sms service provider in chennai
bulk whatsapp service provider in chennai
bulk sms marketing in chennai
bulk sms price in chennai
bulk sms provider chennai
bulk sms service provider in chennai
chennai bulk sms
best bulk sms service provider in chennai
bulksms in Chennai
bulk sms marketing chennai

andaman photoshoot said...

Really a quality post you shared here. I got a good knowledge from your blog. Thanks for sharing.
photoshoot in andaman
photographers in andaman
photoshoot at andaman
andaman photoshoot
pre wedding shoot in andaman
photoshoot in havelock Andaman

Content Soul said...

I like digestible content but Google like SEO oriented content. Really amazing!

Anonymous said...

https://bizfindernearme.com/on-point-heating-and-air-conditioning-company-in-dallas-tx/

Anonymous said...

Awesome. This blog is very impressive and very helpful. If you are searching for the fastest and cheap USA Dedicated Server, you can ask us for more details and services.. USA Dedicated Server

Neelesh said...

Thanks for sharing this informative blog.
Team outing resorts in Ooty