Last active
October 9, 2023 18:41
-
-
Save anosulchik/388effd73ecabf5148b7ab56f611059a to your computer and use it in GitHub Desktop.
Revisions
-
anosulchik revised this gist
Oct 9, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # https://catalog.workshops.aws/msk-labs/en-US/addingbrokers/reassignpartitions $ cat <<EOF > topics-to-move.json { "topics": [ { "topic" : "my-topic"}, { "topic" : "__consumer_offsets"} ], "version":1} EOF $ cat <<EOF > client.properties -
anosulchik created this gist
Jun 23, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ # https://catalog.workshops.aws/msk-labs/en-US/addingbrokers/reassignpartitions $ cat <<EOF > topics-to-move.json { "topics": [ { "topic" : "my-topic"}], "version":1} EOF $ cat <<EOF > client.properties security.protocol=SSL # ... EOF $ export KAFKA_BROKERS="..." # Example of repalancing partitions amoung 6 brokers: $ bin/kafka-reassign-partitions.sh --bootstrap-server "${KAFKA_BROKERS}" --command-config client.properties --topics-to-move-json-file topics-to-move.json --broker-list "1,2,3,4,5,6" --generate | awk -F: '/Proposed partition reassignment configuration/ { getline; print $0 }' | jq . > expand-cluster-reassignment.json $ cat expand-cluster-reassignment.json $ bin/kafka-reassign-partitions.sh --bootstrap-server "${KAFKA_BROKERS}" --command-config client.properties --reassignment-json-file expand-cluster-reassignment.json --execute $ bin/kafka-reassign-partitions.sh --bootstrap-server "${KAFKA_BROKERS}" --command-config client.properties --reassignment-json-file expand-cluster-reassignment.json --verify