Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # dev >> Re: Review Request 14554: Move AddPartitions into TopicCommand in trunk


Copy link to this message
-
Re: Review Request 14554: Move AddPartitions into TopicCommand in trunk

This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14554/#review26821
Got the following error when running the tool.

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --partitions 3 --topic test
partitions can only be added when topic has no key
Exception in thread "main" java.lang.NullPointerException
at kafka.admin.AdminUtils$.getManualReplicaAssignment(AdminUtils.scala:122)
at kafka.admin.AdminUtils$.addPartitions(AdminUtils.scala:106)
at kafka.admin.TopicCommand$.alterTopic(TopicCommand.scala:91)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:50)
at kafka.admin.TopicCommand.main(TopicCommand.scala)

core/src/main/scala/kafka/admin/TopicCommand.scala
<https://reviews.apache.org/r/14554/#comment52172>

    Technically, one can still increase # partitions even if messages have keys. The user just needs to be aware of the impact, i.e., messages with the same key may move to a different partition.

core/src/main/scala/kafka/admin/TopicCommand.scala
<https://reviews.apache.org/r/14554/#comment52173>

    Ditto for the comment above.
- Jun Rao
On Oct. 9, 2013, 6:48 a.m., Sriram Subramanian wrote: