From d088bc6c03baa2a7890ab846037f8e4db419e5ef Mon Sep 17 00:00:00 2001 From: Justin Lei Date: Tue, 12 Mar 2024 17:41:31 -0700 Subject: [PATCH] Update README.md --- .gitignore | 3 +++ README.md | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.gitignore b/.gitignore index 8168bf9..c7e69b4 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ go.work # Build output kafka-util dist/ + +# Mac stuff +.DS_Store diff --git a/README.md b/README.md index be6a76d..baf8e92 100644 --- a/README.md +++ b/README.md @@ -70,3 +70,25 @@ Use the `--dry-run` flag to print the reassignments without actually executing t ```shell kafka-util stage --reassignment-json-file reassignments.json --max-moves-per-broker 1 --dry-run ``` + +## Describe topics + +To describe topics: +```shell +kafka-util topics --topic foobar --topic foobaz +``` + +To print partition leadership distribution per topic: +```shell +kafka-util topics --topic foobar --topic foobaz --leader-distribution +``` + +To print partition replica distribution per topic: +```shell +kafka-util topics --topic foobar --topic foobaz --replica-distribution +``` + +Generate a topics-to-move JSON file: +```shell +kafka-util topics --topic foobar --topic foobaz --generate +``` \ No newline at end of file