[
https://issues.apache.org/jira/browse/KAFKA-3947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411318#comment-15411318
]
Ewen Cheslack-Postava commented on KAFKA-3947:
----------------------------------------------
[~kawamuray] Thanks for the contribution. The CLI tools are considered public
API, so additions like this should be proposed on the mailing list and
ultimately need a KIP to be accepted. This allows everyone to discuss and
settle on the best approach before we commit to supporting and maintaining
compatibility for an interface.
Here's, I wonder if the partition reassignment tool is the right place for this
feature? Why not use the kafka-topics command? It seems like that already gives
you all the info you want (though perhaps not currently in the format you want).
> kafka-reassign-partitions.sh should support dumping current assignment
> ----------------------------------------------------------------------
>
> Key: KAFKA-3947
> URL: https://issues.apache.org/jira/browse/KAFKA-3947
> Project: Kafka
> Issue Type: Improvement
> Components: tools
> Affects Versions: 0.10.0.0
> Reporter: Yuto Kawamura
> Assignee: Yuto Kawamura
> Priority: Minor
> Fix For: 0.10.1.0
>
>
> When I building my own tool to perform reassignment of partitions, I realized
> that there's no way to dump the current partition assignment in machine
> parsable format such as JSON.
> Actually giving {{\-\-generate}} option to the kafka-reassign-partitions.sh
> script dumps the current assignment of topic given by
> {{\-\-topics-to-assign-json-file}} but it's very inconvenient because of:
> - I want the dump containing all topics. That is, I wanna skip generating the
> list of current topics to pass it to the generate command.
> - The output is concatenated with the result of reassignment so can't do
> simply something like: {{kafka-reassign-partitions.sh --generate ... >
> current-assignment.json}}
> - Don't need to ask kafka to generate reassginment to get the current
> assignment in the first place.
> Here I'd like to add the {{\-\-dump}} option to kafka-reassign-partitions.sh.
> I was wondering whether this functionality should be provided by
> {{kafka-reassign-partitions.sh}} or {{kafka-topics.sh}} but now I think
> {{kafka-reassign-partitions.sh}} should be much proper as the resulting JSON
> should be in the format of {{\-\-reassignment-json-file}} which sticks to
> this command.
> Will follow up the patch implements this shortly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)