[
https://issues.apache.org/jira/browse/KAFKA-3947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15370506#comment-15370506
]
ASF GitHub Bot commented on KAFKA-3947:
---------------------------------------
GitHub user kawamuray opened a pull request:
https://github.com/apache/kafka/pull/1606
KAFKA-3947: Add dumping current assignment capability to
kafka-reassign-partitions.sh
Issue: https://issues.apache.org/jira/browse/KAFKA-3947
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kawamuray/kafka KAFKA-3947-dump-support
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1606.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1606
----
commit 929c2007d581fa12548e7b7bcedf8edd34295772
Author: Yuto Kawamura <[email protected]>
Date: 2016-07-11T10:03:41Z
MINOR: Remove unused import
commit 54c99f1c48b147e8c3616cf7da7dcd5e6adc8c34
Author: Yuto Kawamura <[email protected]>
Date: 2016-07-11T10:04:30Z
MINOR: kafka-reassign-partitions.sh no longer stands only to perform
reassignment
commit 5054918a818cb901a24284ab300619e000490a98
Author: Yuto Kawamura <[email protected]>
Date: 2016-07-11T10:08:33Z
KAFKA-3947: Add dumping current assignment capability to
kafka-reassign-partitions.sh
----
> 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.0.1
>
>
> 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)