[
https://issues.apache.org/jira/browse/KAFKA-9688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17064578#comment-17064578
]
ASF GitHub Bot commented on KAFKA-9688:
---------------------------------------
d8tltanc commented on pull request #8332: KAFKA-9688: kafka-topic.sh should
show KIP-455 adding and removing replicas
URL: https://github.com/apache/kafka/pull/8332
*More detailed description of your change,
Print AR and RR info in describe topic command, if the current reassignment
exists.
*Summary of testing strategy (including rationale)
1. Commented out step B2 to B8 in KafkaController::onPartitionReassignment
so the adding replica and removing replica won’t be set to the empty set in
memory.
2. Recompile kafka src
3. Create a reassign json file with content below:
{"partitions":
[{"topic": "my-replicated-topic",
"partition": 0,
"replicas": [1,2] }],
"version":1
}
4. Ran the following scripts:
$ bin/kafka-topics.sh --create --bootstrap-server localhost:9092
--replication-factor 3 --partitions 1 --topic my-replicated-topic
$ bin/kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic
my-replicated-topic
Topic: my-replicated-topic PartitionCount: 1 ReplicationFactor: 3
Configs: segment.bytes=1073741824
Topic: my-replicated-topic Partition: 0 Leader: 2
Replicas: 2,1,0 Isr: 2,1,0
$ bin/kafka-reassign-partitions.sh --reassignment-json-file
bin/reassign.json --execute --zookeeper localhost:2181
$ bin/kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic
my-replicated-topic
Topic: my-replicated-topic Partition: 0 Leader: 2 Replicas: 2,1,0
Isr: 2,1,0 Adding Replicas: [] Removing Replicas: [0]
5. Similarly, also tested no reassignment changes won’t throw a null ptr
exception. (edited)
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> kafka-topic.sh should show KIP-455 adding and removing replicas
> ---------------------------------------------------------------
>
> Key: KAFKA-9688
> URL: https://issues.apache.org/jira/browse/KAFKA-9688
> Project: Kafka
> Issue Type: Improvement
> Components: tools
> Reporter: Colin McCabe
> Assignee: Cheng Tan
> Priority: Major
>
> kafka-topic.sh should show KIP-455 adding and removing replicas, as described
> in KIP-455.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)