kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Wang <aw...@netflix.com.INVALID>
Subject Add partitions with replica assignment in same command
Date Sat, 08 Nov 2014 00:17:35 GMT
I am trying to figure out how to add partitions and assign replicas using
one admin command. I tried kafka.admin.TopicCommand to increase the
partition number from 9 to 12 with the following options:

/apps/kafka/bin/kafka-run-class.sh kafka.admin.TopicCommand  --zookeeper
${ZOOKEEPER} --alter --topic test_topic_4 --partitions 12
--replica-assignment 2:1,0:2,1:0,1:2,2:0,0:1,1:0,2:1,0:2,2:1,0:2,1:0

This gives me an error

Option "[replica-assignment]" can't be used with option"[partitions]"

Looking into the TopicCommand, alterTopic function seems to be able to
handle that but the command exits with the above error before this function
is invoked.

Is there any workaround or other recommended way to achieve this?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message