We need to make the output of list topic command more readable.
Attach a patch.
While you are touching this, would it be reasonable to also switch from using the AdminUtil to a blank TopicMetadataRequest? It runs a lot quicker if there are a large number of topics and you run the tool from outside the ZK cluster's DC. Also, the topicOpt description has been misleading for a while.
This is already done on trunk, please backport that.
Attach patch v2.
1. Back ported the fix from trunk and made a slight change to print each partition in a single line.
2. Fixed the description of the topic option.
3. Didn't make the change to use TopicMetadataRequest since it's not a blocker. Also, in trunk, list topic is merged into a single tool that requires ZK.
Overall, good change. 2 suggestions -
1. Can we not make this change as part of overriding the toString() API of PartitionMetadata ?
2. For the ease of scripting, please can we
2.1 reduce 2 tabs to 1 tab ?
2.2 remove the space after the comma ?
Thanks for the review. These are good suggestions. Attach patch v3 that addresses those issues.
Looks great, thanks for the patch !
Thanks for the review. Committed to 0.8.