Hi Wenbing, Thanks for the KIP, I can see this being useful.
1. Could you include an example command line and sample output of the command in the KIP? 2. I think a better name for the option would be --non-preferred-leader rather than --under-preferred-replica-partitions 3. One of the things a user might do after running this command would be to use `kafka-preferred-replica-election.sh` to try electing the preferred leader for (some of) those partitions. `kafka-preferred-replica-election.sh` reads a JSON file containing the partitions which should have the preferred leader elected. It would be tedious if the user had to reformat the output of `kafka-topics.sh --non-preferred-leader` in order to pass it to `kafka-preferred-replica-election.sh`. The tools would need to use a common format to do that, most obviously by `kafka-topics.sh --non-preferred-leader` emiting the existing JSON format. It's a little awkward because the other outputs from kafka-topics.sh don't naturally get used as inputs to the other tools, so I don't think a top level option, such as `--output=json` would be a good fit. I did wonder if `--non-preferred-leader=json` could be used for the JSON output, and plain `--non-preferred-leader` for the more human readable output, but maybe `--non-preferred-leader-json` (instead of --non-preferred-leader) or `--non-preferred-leader-format=json` (as well as --non-preferred-leader) is a more obvious way to do it. Kind regards, Tom On Sat, Mar 27, 2021 at 2:10 PM wenbing shen <oliver.shen...@gmail.com> wrote: > Hi everyone, > > I'd like to discuss the following proposal to add > --under-preferred-replica-partitions option to describe topics command. > > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-727%3A+Add+--under-preferred-replica-partitions+option+to+describe+topics+command > > Many thanks, > > Wenbing > >