THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
$ bin/kafka-leader-election.sh --help This tool attempts to elect a new leader for a set of topic partitions. The type of elections supported are preferred replicas and unclean replica. Option Description ------ ----------- --admin.config <String: config file> Admin client config properties file to pass to the admin client when --bootstrap-server is given. --all-topic-partitions Perform election on all of the topic partitions. Not allowed if --topic, --partition or --path-to-json-file is specified. --bootstrap-server <String: host:port> A host name and port for the broker to connect to, in the form host:port. Multiple comma-separated URLs can be given. REQUIRED unless --zookeeper is given. --election-type <String: election> Type of election to attempt. Possible values are 0"preferred" (or "preferred") for preferred election or 1 (or "unclean" for unclean election. "unclean") for unclean election. REQUIRED. --topic <String: topic> Name of topic for which to perform an election. REQUIRED if --partition is specified. Not allowed if --path-to-json-file or --all-topic-partitions is specified. --partition <Integer: partition id> Partition id for which to perform an election. REQUIRED if --topic is specified. Not allowed if --path-to-json-file or --all-topic-partitions is specified. --help Print usage information. --path-to-json-file <String: list of The JSON file with the list of partitions for which replica partitions for which leader election leader election needs to be should be done. Supported elections triggered> are 0 for preferred and 1 for unclean. If an election is not specified, preferred is the default. This is an example format. {"partitions": [{"topic": "foo", "partition": 1}, {"topic": "foobar", "partition": 2}] } Not allowed if --all-topic-partitions, --topic or --partition flags are specified. |
...