Richard Joerger created KAFKA-12811:
---------------------------------------

             Summary: kafka-topics.sh should let the user know they cannot 
adjust the replication factor for a topic using the --alter flag and not warn 
about missing the --partition flag
                 Key: KAFKA-12811
                 URL: https://issues.apache.org/jira/browse/KAFKA-12811
             Project: Kafka
          Issue Type: Improvement
          Components: admin
            Reporter: Richard Joerger


Currently the kafka-topics.sh tool will return the following message when 
trying to alter the replication factor for a topic:

 
{code:java}
$ ./bin/kafka-topics.sh --bootstrap-server 
{code}
_host_
{code:java}
:9092 --alter --topic testTopic --replication-factor 4
21/05/18 13:23:54 INFO utils.Log4jControllerRegistration$: Registered 
kafka:type=kafka.Log4jController MBean
Missing required argument "[partitions]"
{code}
But, what I believe it should do, since the appropriate way to adjust 
replication factor is to use the kafka-reassign-partitions tool should be to 
let the user know that this is not the appropriate way to adjust the 
replication factor. It would look like this:
{code:java}
$ ./bin/kafka-topics.sh --bootstrap-server 
{code}
_host_
{code:java}
:9092 --alter --topic testTopic --replication-factor 4
Option "[replication-factor]" can't be used with option "[alter]"{code}
Very minor improvement but should help alleviate what seems a little 
unintuitive to some. 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to