mingdaoy commented on code in PR #19065:
URL: https://github.com/apache/kafka/pull/19065#discussion_r1976674046
##########
docs/ops.html:
##########
@@ -3827,22 +3827,22 @@ <h4 class="anchor-heading"><a id="kraft_storage"
class="anchor-link"></a><a href
<h5 class="anchor-heading"><a id="kraft_storage_standalone"
class="anchor-link"></a><a href="#kraft_storage_standalone">Bootstrap a
Standalone Controller</a></h5>
The recommended method for creating a new KRaft controller cluster is to
bootstrap it with one voter and dynamically <a href="#kraft_reconfig_add">add
the rest of the controllers</a>. Bootstrapping the first controller can be done
with the following CLI command:
- <pre><code class="language-bash">$ bin/kafka-storage.sh format --cluster-id
<cluster-id> --standalone --config controller.properties</code></pre>
+ <pre><code class="language-bash">$ bin/kafka-storage.sh format --cluster-id
<cluster-id> --standalone --config
config/controller.properties</code></pre>
This command will 1) create a meta.properties file in metadata.log.dir with
a randomly generated directory.id, 2) create a snapshot at
00000000000000000000-0000000000.checkpoint with the necessary control records
(KRaftVersionRecord and VotersRecord) to make this Kafka node the only voter
for the quorum.
<h5 class="anchor-heading"><a id="kraft_storage_voters"
class="anchor-link"></a><a href="#kraft_storage_voters">Bootstrap with Multiple
Controllers</a></h5>
The KRaft cluster metadata partition can also be bootstrapped with more than
one voter. This can be done by using the --initial-controllers flag:
- <pre><code class="language-bash">cluster-id=$(bin/kafka-storage.sh
random-uuid)
-controller-0-uuid=$(bin/kafka-storage.sh random-uuid)
-controller-1-uuid=$(bin/kafka-storage.sh random-uuid)
-controller-2-uuid=$(bin/kafka-storage.sh random-uuid)
+ <pre><code class="language-bash">CLUSTER_ID="$(bin/kafka-storage.sh
random-uuid)"
+CONTROLLER_0_UUID="$(bin/kafka-storage.sh random-uuid)"
+CONTROLLER_1_UUID="$(bin/kafka-storage.sh random-uuid)"
+CONTROLLER_2_UUID="$(bin/kafka-storage.sh random-uuid)"
# In each controller execute
bin/kafka-storage.sh format --cluster-id ${cluster-id} \
--initial-controllers
"0@controller-0:1234:${controller-0-uuid},1@controller-1:1234:${controller-1-uuid},2@controller-2:1234:${controller-2-uuid}"
\
Review Comment:


--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]