Once the offsets topic has been created, changing any server.properties affecting it will have no effect. If you are pre-production, you can start over using the new server properties.
By start over, I mean stopping brokers, purging the kafka logs/data directories of all brokers, purging cluster data from zookeepers, then starting brokers again with your desired server properties settings. -- Peter Bukowinski > On Mar 25, 2018, at 1:01 PM, Anu P <iamkafkau...@gmail.com> wrote: > > Thanks Swapnil. > > I changed *offsets.topic.num.partitions* in server.properties file and > restarted the broker. But, still this config change does not take effect. > > Any ideas? > > Thanks in advance > Tanvi > > On Sun, Mar 25, 2018 at 12:30 AM, Swapnil Gupta <neomatrix1...@gmail.com> > wrote: > >> In brief, this is system level configuration by Kafka. >> >> Consumer offsets partitions can't be changed through command line. >> >> You have to change the configuration file and set this >> *offsets.topic.num.partitions* property to change this. >> >>> On Sun, Mar 25, 2018, 12:49 Anu P <iamkafkau...@gmail.com> wrote: >>> >>> Hi, >>> >>> I am trying to change the number of partitions for __consumer_offsets >> topic >>> by using the following command. However, I get an error stating "Number >> of >>> partitions for offsets topic cannot be changed" >>> >>> >>> */opt/kafka/bin/kafka-topics.sh --zookeeper <zookeeper> --alter --topic >>> __consumer_offsets --partitions 54 * >>> >>> >>> Error while executing topic command : The number of partitions for the >>> offsets topic cannot be changed. >>> ERROR java.lang.IllegalArgumentException: The number of partitions for >> the >>> offsets topic cannot be changed. >>> at >>> >>> kafka.admin.TopicCommand$$anonfun$alterTopic$1.apply( >> TopicCommand.scala:142) >>> ..... >>> >>> >>> >>> Environment details: >>> >>> 1. 3 zookeepers and 3 kafka brokers (version 1.0.1) >>> 2. After deploying kafka, I tried the kafka-topics command (above) to >>> increase it partitions. But it fails. Can someone please help me >>> understand >>> why? Am I missing something? >>> 3. I want to distribute partitions leaders equally among brokers. So >>> want to increase the number of partitions for offsets topic. >>> >>> >>> Thanks in advance. >>> >>> Tanvi >>> >>