-----------------------------------------------------------
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:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14554/
> -----------------------------------------------------------
> 
> (Updated Oct. 9, 2013, 6:48 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1052
>     https://issues.apache.org/jira/browse/KAFKA-1052
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> Move AddPartitions into TopicCommand
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/admin/AddPartitionsCommand.scala 
> c74d9c224565d475d4104467ba36c0a287b68239 
>   core/src/main/scala/kafka/admin/AdminUtils.scala 
> 6560fc668e8b8feedc1e3f63c11aac2ff370c8d0 
>   core/src/main/scala/kafka/admin/TopicCommand.scala 
> 06bbd37a5af1ea5bd5f6c42cb9063cc7d6fd381b 
>   core/src/test/scala/unit/kafka/admin/AddPartitionsTest.scala 
> 09254ccac2a4d5885a372f1f21b0a5813a930ded 
> 
> Diff: https://reviews.apache.org/r/14554/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sriram Subramanian
> 
>

Reply via email to