You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "jayden sun (JIRA)" <ji...@apache.org> on 2014/09/29 05:12:33 UTC

[jira] [Created] (KAFKA-1656) "replica-assignment" option in "bin/kakfa-topics.sh" doesn't work with "alter"

jayden sun created KAFKA-1656:
---------------------------------

             Summary: "replica-assignment" option  in "bin/kakfa-topics.sh" doesn't work with "alter"
                 Key: KAFKA-1656
                 URL: https://issues.apache.org/jira/browse/KAFKA-1656
             Project: Kafka
          Issue Type: Improvement
          Components: tools
    Affects Versions: 0.8.1.1
         Environment: all
            Reporter: jayden sun
            Priority: Minor


"replica-assignment" option  in "bin/kakfa-topics.sh" works only with "--create" and doesn't work with "--alter", but the config comment is somewhat confusing. 

For example:
bin/kafka-topics.sh --create --zookeeper 10.0.44.137:2181 --replica-assignment 1:2,1:2 --partitions 2 --topic topic
i use the command above to create a topic with two partitions on broker 1 and 2.
and then i want to change partition count from two to four, and the newly created partition on broker 3 and 4.
So i try the command:
bin/kafka-topics.sh --alter --zookeeper 10.0.44.137:2181 --replica-assignment 3:4,3:4 --partitions 4 --topic topic
But it does not works!!! "replica-assignment" can't be used with "partitions".

What i can do is to add partitions like this:
bin/kafka-topics.sh --alter --zookeeper 10.0.44.137:2181 --partitions 4 --topic topic
and then use the partition reassignment command to change the brokers for newly partitions  to 3 and 4.

So,i think "or altered" in the comment for "--replica-assignment" should be removed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)