You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ti...@apache.org on 2022/12/13 03:56:30 UTC

[pulsar] branch master updated: [improve][doc] improve doc and fix errors (#18860)

This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a0b77595a7 [improve][doc] improve doc and fix errors (#18860)
4a0b77595a7 is described below

commit 4a0b77595a7719dc7bcbda73699e3d15b0fbfa3c
Author: labuladong <la...@foxmail.com>
AuthorDate: Tue Dec 13 11:56:24 2022 +0800

    [improve][doc] improve doc and fix errors (#18860)
---
 site2/docs/administration-proxy.md                 |   4 +-
 site2/docs/administration-zk-bk.md                 |  18 +--
 site2/docs/concepts-architecture-overview.md       |   4 +-
 site2/docs/concepts-messaging.md                   |  15 ++-
 .../docs/concepts-multiple-advertised-listeners.md |   5 +-
 site2/docs/concepts-proxy-sni-routing.md           |  16 +--
 site2/docs/deploy-bare-metal-multi-cluster.md      |  14 +--
 site2/docs/deploy-bare-metal.md                    | 122 +++++++++++----------
 site2/docs/deploy-docker.md                        |  22 +++-
 site2/docs/functions-debug-cli.md                  |   4 +-
 site2/docs/functions-debug-localrun.md             |  12 +-
 site2/docs/getting-started-docker.md               |  15 ++-
 site2/docs/how-to-landing.md                       |   1 -
 site2/docs/install-deploy-upgrade-landing.md       |   2 +-
 site2/docs/io-overview.md                          |  16 +--
 site2/docs/io-quickstart.md                        |  94 ++++++++--------
 site2/docs/schema-overview.md                      |   2 +-
 site2/docs/security-authorization.md               |   4 +-
 site2/docs/security-oauth2.md                      |  32 +++---
 site2/docs/security-tls-transport.md               |  24 ++--
 site2/docs/tutorials-namespace.md                  |   2 +-
 site2/docs/tutorials-produce-consume.md            |   2 +-
 site2/docs/tutorials-tenant.md                     |   4 +-
 site2/docs/tutorials-topic.md                      |   2 +-
 24 files changed, 226 insertions(+), 210 deletions(-)

diff --git a/site2/docs/administration-proxy.md b/site2/docs/administration-proxy.md
index adbe0df1dd3..5a4eae023ba 100644
--- a/site2/docs/administration-proxy.md
+++ b/site2/docs/administration-proxy.md
@@ -102,8 +102,8 @@ To start the proxy:
 ```bash
 cd /path/to/pulsar/directory
 bin/pulsar proxy \
---metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 \
---configuration-metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+    --metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 \
+    --configuration-metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
 ```
 
 > You can run multiple instances of the Pulsar proxy in a cluster.
diff --git a/site2/docs/administration-zk-bk.md b/site2/docs/administration-zk-bk.md
index a4be8cfdce0..a492fe6cc09 100644
--- a/site2/docs/administration-zk-bk.md
+++ b/site2/docs/administration-zk-bk.md
@@ -10,12 +10,12 @@ Pulsar relies on two external systems for essential tasks:
 * [BookKeeper](http://bookkeeper.apache.org/) is responsible for [persistent storage](concepts-architecture-overview.md#persistent-storage) of message data.
 
 ZooKeeper and BookKeeper are both open-source [Apache](https://www.apache.org/) projects.
+This diagram illustrates the role of ZooKeeper and BookKeeper in a Pulsar cluster:
 
-:::tip
+![ZooKeeper and BookKeeper](/assets/pulsar-system-architecture.png)
 
-Skip to the [How Pulsar uses ZooKeeper and BookKeeper](#how-pulsar-uses-zookeeper-and-bookkeeper) section below for a more schematic explanation of the role of these two systems in Pulsar.
+Each Pulsar cluster consists of one or more message brokers. Each broker relies on an ensemble of bookies.
 
-:::
 
 ## ZooKeeper
 
@@ -251,8 +251,8 @@ And then you can decommission bookies safely. To decommission bookies, complete
 You can run the following command to check if the bookie you have decommissioned is listed:
 
 ```bash
-./bookkeeper shell listbookies -rw -h
-./bookkeeper shell listbookies -ro -h
+bin/bookkeeper shell listbookies -rw -h
+bin/bookkeeper shell listbookies -ro -h
 ```
 
 ## BookKeeper persistence policies
@@ -352,11 +352,3 @@ pulsar-admin namespaces get-persistence my-tenant/my-ns
 ```java
 PersistencePolicies policies = admin.namespaces().getPersistence(namespace);
 ```
-
-## How Pulsar uses ZooKeeper and BookKeeper
-
-This diagram illustrates the role of ZooKeeper and BookKeeper in a Pulsar cluster:
-
-![ZooKeeper and BookKeeper](/assets/pulsar-system-architecture.png)
-
-Each Pulsar cluster consists of one or more message brokers. Each broker relies on an ensemble of bookies.
diff --git a/site2/docs/concepts-architecture-overview.md b/site2/docs/concepts-architecture-overview.md
index 116b904d19d..0d4a292e8c8 100644
--- a/site2/docs/concepts-architecture-overview.md
+++ b/site2/docs/concepts-architecture-overview.md
@@ -130,8 +130,8 @@ Architecturally, the Pulsar proxy gets all the information it requires from ZooK
 ```bash
 cd /path/to/pulsar/directory
 bin/pulsar proxy \
---metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 \
---configuration-metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
+    --metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181 \
+    --configuration-metadata-store zk:my-zk-1:2181,my-zk-2:2181,my-zk-3:2181
 ```
 
 > #### Pulsar proxy docs
diff --git a/site2/docs/concepts-messaging.md b/site2/docs/concepts-messaging.md
index 357840b8a94..92db99e33ca 100644
--- a/site2/docs/concepts-messaging.md
+++ b/site2/docs/concepts-messaging.md
@@ -99,9 +99,9 @@ Compression types are stored in the message metadata, so consumers can adopt dif
 
 The sample code below shows how to enable compression type for a producer:
 
-```
+```java
 client.newProducer()
-    .topic(“topic-name”)
+    .topic("topic-name")
     .compressionType(CompressionType.LZ4)
     .create();
 ```
@@ -126,7 +126,6 @@ For example:
 
 ```java
 Consumer<byte[]> consumer = pulsarClient.newConsumer()
-        .newConsumer(Schema.BYTES)
         .topic(topicName)
         .subscriptionName(subscriptionName)
         .subscriptionType(subType)
@@ -317,10 +316,10 @@ If you want to use redelivery backoff, you can use the following API.
 ```java
 consumer.ackTimeout(10, TimeUnit.SECOND)
         .ackTimeoutRedeliveryBackoff(MultiplierRedeliveryBackoff.builder()
-        .minDelayMs(1000)
-        .maxDelayMs(60 * 1000)
-        .multiplier(2)
-        .build())
+            .minDelayMs(1000)
+            .maxDelayMs(60 * 1000)
+            .multiplier(2)
+            .build());
 ```
 
 The message redelivery behavior should be as follows.
@@ -388,7 +387,7 @@ Consumer<byte[]> consumer = pulsarClient.newConsumer(Schema.BYTES)
 
 The default retry letter topic uses this format:
 
-```
+```text
 <topicname>-<subscriptionname>-RETRY
 ```
 
diff --git a/site2/docs/concepts-multiple-advertised-listeners.md b/site2/docs/concepts-multiple-advertised-listeners.md
index 4ed7fe144a5..b6b98af87a1 100644
--- a/site2/docs/concepts-multiple-advertised-listeners.md
+++ b/site2/docs/concepts-multiple-advertised-listeners.md
@@ -23,9 +23,8 @@ This example shows how a Pulsar client uses multiple advertised listeners.
 
 1. Configure multiple advertised listeners in the broker configuration file.
 
-```shell
-advertisedListeners={listenerName}:pulsar://xxxx:6650,
-{listenerName}:pulsar+ssl://xxxx:6651
+```properties
+advertisedListeners={listenerName}:pulsar://xxxx:6650,{listenerName}:pulsar+ssl://xxxx:6651
 ```
 
 2. Specify the listener name for the client.
diff --git a/site2/docs/concepts-proxy-sni-routing.md b/site2/docs/concepts-proxy-sni-routing.md
index d6363bb02f4..b4a6e4cbf7b 100644
--- a/site2/docs/concepts-proxy-sni-routing.md
+++ b/site2/docs/concepts-proxy-sni-routing.md
@@ -146,19 +146,19 @@ In this example, a Pulsar cluster is deployed into two separate regions, `us-wes
 
 ```shell
 ./pulsar-admin clusters update \
---broker-url-secure pulsar+ssl://east-broker-vip:6651 \
---url http://east-broker-vip:8080 \
---proxy-protocol SNI \
---proxy-url pulsar+ssl://east-ats-proxy:443
+    --broker-url-secure pulsar+ssl://east-broker-vip:6651 \
+    --url http://east-broker-vip:8080 \
+    --proxy-protocol SNI \
+    --proxy-url pulsar+ssl://east-ats-proxy:443
 ```
 
 (b) Configure the cluster metadata for `us-west` with `us-west` broker service URL and `us-west` ATS proxy URL with SNI proxy-protocol.
 
 ```shell
 ./pulsar-admin clusters update \
---broker-url-secure pulsar+ssl://west-broker-vip:6651 \
---url http://west-broker-vip:8080 \
---proxy-protocol SNI \
---proxy-url pulsar+ssl://west-ats-proxy:443
+    --broker-url-secure pulsar+ssl://west-broker-vip:6651 \
+    --url http://west-broker-vip:8080 \
+    --proxy-protocol SNI \
+    --proxy-url pulsar+ssl://west-ats-proxy:443
 ```
 
diff --git a/site2/docs/deploy-bare-metal-multi-cluster.md b/site2/docs/deploy-bare-metal-multi-cluster.md
index ac4add4a0ab..219ad87362a 100644
--- a/site2/docs/deploy-bare-metal-multi-cluster.md
+++ b/site2/docs/deploy-bare-metal-multi-cluster.md
@@ -205,13 +205,13 @@ You can initialize this metadata using the [`initialize-cluster-metadata`](refer
 
 ```shell
 bin/pulsar initialize-cluster-metadata \
---cluster us-west \
---metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181/my-chroot-path \
---configuration-metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181/my-chroot-path \
---web-service-url http://pulsar.us-west.example.com:8080/ \
---web-service-url-tls https://pulsar.us-west.example.com:8443/ \
---broker-service-url pulsar://pulsar.us-west.example.com:6650/ \
---broker-service-url-tls pulsar+ssl://pulsar.us-west.example.com:6651/
+    --cluster us-west \
+    --metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181/my-chroot-path \
+    --configuration-metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181/my-chroot-path \
+    --web-service-url http://pulsar.us-west.example.com:8080/ \
+    --web-service-url-tls https://pulsar.us-west.example.com:8443/ \
+    --broker-service-url pulsar://pulsar.us-west.example.com:6650/ \
+    --broker-service-url-tls pulsar+ssl://pulsar.us-west.example.com:6651/
 ```
 
 As you can see from the example above, you need to specify the following:
diff --git a/site2/docs/deploy-bare-metal.md b/site2/docs/deploy-bare-metal.md
index d30fb286326..36dac7e0242 100644
--- a/site2/docs/deploy-bare-metal.md
+++ b/site2/docs/deploy-bare-metal.md
@@ -37,7 +37,7 @@ To run Pulsar on bare metal, the following configuration is recommended:
 * At least 6 Linux machines or VMs
   * 3 for running [ZooKeeper](https://zookeeper.apache.org)
   * 3 for running a Pulsar broker, and a [BookKeeper](https://bookkeeper.apache.org) bookie
-* A single [DNS](https://en.wikipedia.org/wiki/Domain_Name_System) name covering all of the Pulsar broker hosts
+* A single [DNS](https://en.wikipedia.org/wiki/Domain_Name_System) name covering all of the Pulsar broker hosts (optional)
 
 :::note
 
@@ -126,9 +126,6 @@ Directory | Contains
 
 ## Install Built-in Connectors (optional)
 
-> Since Pulsar release `2.1.0-incubating`, Pulsar provides a separate binary distribution, containing all the `built-in` connectors.
-> To enable the `built-in` connectors (optional), you can follow the instructions below.
-
 To use `built-in` connectors, you need to download the connectors tarball release on every broker node in one of the following ways :
 
 * by clicking the link below and downloading the release from an Apache mirror:
@@ -157,10 +154,6 @@ pulsar-io-aerospike-@pulsar:version@.nar
 
 ## Install Tiered Storage Offloaders (optional)
 
-> Since Pulsar release `2.2.0`, Pulsar releases a separate binary distribution, containing the tiered storage offloaders.
-> If you want to enable tiered storage feature, you can follow the instructions as below; otherwise you can
-> skip this section for now.
-
 To use tiered storage offloaders, you need to download the offloaders tarball release on every broker node in one of the following ways:
 
 * by clicking the link below and downloading the release from an Apache mirror:
@@ -180,8 +173,8 @@ Once you download the tarball, in the Pulsar directory, untar the offloaders pac
 ```bash
 tar xvfz apache-pulsar-offloaders-@pulsar:version@-bin.tar.gz
 
-// you can find a directory named `apache-pulsar-offloaders-@pulsar:version@` in the pulsar directory
-// then copy the offloaders
+# you can find a directory named `apache-pulsar-offloaders-@pulsar:version@` in the pulsar directory
+# then copy the offloaders
 
 mv apache-pulsar-offloaders-@pulsar:version@/offloaders offloaders
 
@@ -194,7 +187,11 @@ For more details of how to configure tiered storage feature, you can refer to th
 
 ## Deploy a ZooKeeper cluster
 
-> If you already have an existing zookeeper cluster and want to use it, you can skip this section.
+:::note
+
+If you already have an existing zookeeper cluster and want to use it, you can skip this section.
+
+:::
 
 [ZooKeeper](https://zookeeper.apache.org) manages a variety of essential coordination-related and configuration-related tasks for Pulsar. To deploy a Pulsar cluster, you need to deploy ZooKeeper first. A 3-node ZooKeeper cluster is the recommended configuration. Pulsar does not make heavy use of ZooKeeper, so the lightweight machines or VMs should suffice for running ZooKeeper.
 
@@ -248,13 +245,13 @@ You can initialize this metadata using the [`initialize-cluster-metadata`](refer
 
 ```shell
 bin/pulsar initialize-cluster-metadata \
---cluster pulsar-cluster-1 \
---metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181 \
---configuration-metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181 \
---web-service-url http://pulsar.us-west.example.com:8080 \
---web-service-url-tls https://pulsar.us-west.example.com:8443 \
---broker-service-url pulsar://pulsar.us-west.example.com:6650 \
---broker-service-url-tls pulsar+ssl://pulsar.us-west.example.com:6651
+    --cluster pulsar-cluster-1 \
+    --metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181 \
+    --configuration-metadata-store zk:zk1.us-west.example.com:2181,zk2.us-west.example.com:2181 \
+    --web-service-url http://pulsar.us-west.example.com:8080 \
+    --web-service-url-tls https://pulsar.us-west.example.com:8443 \
+    --broker-service-url pulsar://pulsar.us-west.example.com:6650 \
+    --broker-service-url-tls pulsar+ssl://pulsar.us-west.example.com:6651
 ```
 
 As you can see from the example above, you will need to specify the following:
@@ -269,27 +266,30 @@ Flag | Description
 `--broker-service-url` | A broker service URL enabling interaction with the brokers in the cluster. This URL should not use the same DNS name as the web service URL but should use the `pulsar` scheme instead. The default port is 6650 (you had better not use a different port).
 `--broker-service-url-tls` | If you use [TLS](security-tls-transport.md), you also need to specify a TLS web service URL for the cluster as well as a TLS broker service URL for the brokers in the cluster. The default port is 6651 (you had better not use a different port).
 
+:::note
 
-> If you do not have a DNS server, you can use multi-host format in the service URL with the following settings:
->
-> ```shell
-> --web-service-url http://host1:8080,host2:8080,host3:8080 \
-> --web-service-url-tls https://host1:8443,host2:8443,host3:8443 \
-> --broker-service-url pulsar://host1:6650,host2:6650,host3:6650 \
-> --broker-service-url-tls pulsar+ssl://host1:6651,host2:6651,host3:6651
-> ```
->
-> If you want to use an existing BookKeeper cluster, you can add the `--existing-bk-metadata-service-uri` flag as follows:
->
-> ```shell
-> --existing-bk-metadata-service-uri "zk+null://zk1:2181;zk2:2181/ledgers" \
-> --web-service-url http://host1:8080,host2:8080,host3:8080 \
-> --web-service-url-tls https://host1:8443,host2:8443,host3:8443 \
-> --broker-service-url pulsar://host1:6650,host2:6650,host3:6650 \
-> --broker-service-url-tls pulsar+ssl://host1:6651,host2:6651,host3:6651
-> ```
+If you do not have a DNS server, you can use multi-host format in the service URL with the following settings:
 
-> You can obtain the metadata service URI of the existing BookKeeper cluster by using the `bin/bookkeeper shell whatisinstanceid` command. You must enclose the value in double quotes since the multiple metadata service URIs are separated with semicolons.
+```shell
+--web-service-url http://host1:8080,host2:8080,host3:8080 \
+--web-service-url-tls https://host1:8443,host2:8443,host3:8443 \
+--broker-service-url pulsar://host1:6650,host2:6650,host3:6650 \
+--broker-service-url-tls pulsar+ssl://host1:6651,host2:6651,host3:6651
+```
+
+If you want to use an existing BookKeeper cluster, you can add the `--existing-bk-metadata-service-uri` flag as follows:
+
+```shell
+--existing-bk-metadata-service-uri "zk+null://zk1:2181;zk2:2181/ledgers" \
+--web-service-url http://host1:8080,host2:8080,host3:8080 \
+--web-service-url-tls https://host1:8443,host2:8443,host3:8443 \
+--broker-service-url pulsar://host1:6650,host2:6650,host3:6650 \
+--broker-service-url-tls pulsar+ssl://host1:6651,host2:6651,host3:6651
+```
+
+You can obtain the metadata service URI of the existing BookKeeper cluster by using the `bin/bookkeeper shell whatisinstanceid` command. You must enclose the value in double quotes since the multiple metadata service URIs are separated with semicolons.
+
+:::
 
 ## Deploy a BookKeeper cluster
 
@@ -340,7 +340,7 @@ Pulsar brokers are the last thing you need to deploy in your Pulsar cluster. Bro
 
 ### Configure Brokers
 
-The most important element of broker configuration is ensuring that each broker is aware of the ZooKeeper cluster that you have deployed. Ensure that the [`metadataStoreUrl`](reference-configuration.md#broker) and [`configurationMetadataStoreUrl`](reference-configuration.md#broker) parameters are correct. In this case, since you only have 1 cluster and no configuration store setup, the `configurationMetadataStoreUrl` point to the same `metadataStoreUrl`.
+You can configure BookKeeper bookies using the `conf/broker.conf` configuration file. The most important element of broker configuration is ensuring that each broker is aware of the ZooKeeper cluster that you have deployed. Ensure that the [`metadataStoreUrl`](reference-configuration.md#broker) and [`configurationMetadataStoreUrl`](reference-configuration.md#broker) parameters are correct. In this case, since you only have 1 cluster and no configuration store setup, the `configurationMet [...]
 
 ```properties
 metadataStoreUrl=zk://zk1.us-west.example.com:2181,zk2.us-west.example.com:2181,zk3.us-west.example.com:2181
@@ -423,38 +423,40 @@ webServiceUrl=http://us-west.example.com:8080
 brokerServiceurl=pulsar://us-west.example.com:6650
 ```
 
-> If you do not have a DNS server, you can specify multi-host in service URL as follows:
->
-> ```properties
-> webServiceUrl=http://host1:8080,host2:8080,host3:8080
-> brokerServiceurl=pulsar://host1:6650,host2:6650,host3:6650
-> ```
+:::note
 
+If you do not have a DNS server, you can specify multi-host in service URL as follows:
+```properties
+webServiceUrl=http://host1:8080,host2:8080,host3:8080
+brokerServiceurl=pulsar://host1:6650,host2:6650,host3:6650
+```
+
+:::
 
 Once that is complete, you can publish a message to the Pulsar topic:
 
 ```bash
 bin/pulsar-client produce \
-persistent://public/default/test \
--n 1 \
--m "Hello Pulsar"
+    persistent://public/default/test \
+    -n 1 \
+    -m "Hello Pulsar"
 ```
 
 This command publishes a single message to the Pulsar topic. In addition, you can subscribe to the Pulsar topic in a different terminal before publishing messages as below:
 
 ```bash
 bin/pulsar-client consume \
-persistent://public/default/test \
--n 100 \
--s "consumer-test" \
--t "Exclusive"
+    persistent://public/default/test \
+    -n 100 \
+    -s "consumer-test" \
+    -t "Exclusive"
 ```
 
 Once you successfully publish the above message to the topic, you should see it in the standard output:
 
-```bash
+```
 ----- got message -----
-Hello Pulsar
+key:[null], properties:[], content:Hello Pulsar
 ```
 
 ## Run Functions
@@ -465,13 +467,13 @@ Create an ExclamationFunction `exclamation`.
 
 ```bash
 bin/pulsar-admin functions create \
---jar examples/api-examples.jar \
---classname org.apache.pulsar.functions.api.examples.ExclamationFunction \
---inputs persistent://public/default/exclamation-input \
---output persistent://public/default/exclamation-output \
---tenant public \
---namespace default \
---name exclamation
+    --jar examples/api-examples.jar \
+    --classname org.apache.pulsar.functions.api.examples.ExclamationFunction \
+    --inputs persistent://public/default/exclamation-input \
+    --output persistent://public/default/exclamation-output \
+    --tenant public \
+    --namespace default \
+    --name exclamation
 ```
 
 Check whether the function runs as expected by [triggering](functions-deploy-trigger.md) the function.
diff --git a/site2/docs/deploy-docker.md b/site2/docs/deploy-docker.md
index b5eb3939a09..c266baadb6b 100644
--- a/site2/docs/deploy-docker.md
+++ b/site2/docs/deploy-docker.md
@@ -28,12 +28,22 @@ docker network create pulsar
 #### Create a ZooKeeper container
 Create a ZooKeeper container and start the ZooKeeper service.
 ```bash
-docker run -d -p 2181:2181 --net=pulsar -e metadataStoreUrl=zk:zookeeper:2181 -e cluster-name=cluster-a -e managedLedgerDefaultEnsembleSize=1 -e managedLedgerDefaultWriteQuorum=1 -e managedLedgerDefaultAckQuorum=1 -v $(pwd)/data/zookeeper:/pulsar/data/zookeeper --name zookeeper --hostname zookeeper apachepulsar/pulsar-all:latest bash -c "bin/apply-config-from-env.py conf/zookeeper.conf && bin/generate-zookeeper-config.sh conf/zookeeper.conf && exec bin/pulsar zookeeper"
+docker run -d -p 2181:2181 --net=pulsar \
+    -e metadataStoreUrl=zk:zookeeper:2181 \
+    -e cluster-name=cluster-a -e managedLedgerDefaultEnsembleSize=1 \
+    -e managedLedgerDefaultWriteQuorum=1 \
+    -e managedLedgerDefaultAckQuorum=1 \
+    -v $(pwd)/data/zookeeper:/pulsar/data/zookeeper \
+    --name zookeeper --hostname zookeeper \
+    apachepulsar/pulsar-all:latest \
+    bash -c "bin/apply-config-from-env.py conf/zookeeper.conf && bin/generate-zookeeper-config.sh conf/zookeeper.conf && exec bin/pulsar zookeeper"
 ```
 #### Initialize the cluster metadata
 After creating the ZooKeeper container successfully, you can use the following command to initialize the cluster metadata.
 ```bash
-docker run --net=pulsar --name initialize-pulsar-cluster-metadata apachepulsar/pulsar-all:latest bash -c "bin/pulsar initialize-cluster-metadata \
+docker run --net=pulsar \
+    --name initialize-pulsar-cluster-metadata \
+    apachepulsar/pulsar-all:latest bash -c "bin/pulsar initialize-cluster-metadata \
 --cluster cluster-a \
 --zookeeper zookeeper:2181 \
 --configuration-store zookeeper:2181 \
@@ -46,7 +56,13 @@ docker run --net=pulsar --name initialize-pulsar-cluster-metadata apachepulsar/p
 Create a bookie container and start the bookie service.
 
 ```bash
-docker run -d -e clusterName=cluster-a -e zkServers=zookeeper:2181 --net=pulsar -e metadataServiceUri=metadata-store:zk:zookeeper:2181 -v $(pwd)/data/bookkeeper:/pulsar/data/bookkeeper --name bookie --hostname bookie apachepulsar/pulsar-all:latest    bash -c "bin/apply-config-from-env.py conf/bookkeeper.conf && exec bin/pulsar bookie"
+docker run -d -e clusterName=cluster-a \
+    -e zkServers=zookeeper:2181 --net=pulsar \
+    -e metadataServiceUri=metadata-store:zk:zookeeper:2181 \
+    -v $(pwd)/data/bookkeeper:/pulsar/data/bookkeeper \
+    --name bookie --hostname bookie \
+    apachepulsar/pulsar-all:latest \
+    bash -c "bin/apply-config-from-env.py conf/bookkeeper.conf && exec bin/pulsar bookie"
 ```
 #### Create a broker container
 Create a broker container and start the broker service.
diff --git a/site2/docs/functions-debug-cli.md b/site2/docs/functions-debug-cli.md
index ef10c0d07ab..2f02d3aec92 100644
--- a/site2/docs/functions-debug-cli.md
+++ b/site2/docs/functions-debug-cli.md
@@ -77,7 +77,7 @@ To check the current status of a function:
  ./bin/pulsar-admin functions status \
     --tenant public \
     --namespace default \
-    --name ExclamationFunctio6 \
+    --name ExclamationFunctio6
 ```
 
 As shown below, the `status` command shows the number of instances, running instances, the instance running under the `_ExclamationFunctio6_` function, received messages, successfully processed messages, system exceptions, the average latency and so on.
@@ -114,7 +114,7 @@ To get the current stats of a function:
 bin/pulsar-admin functions stats \
     --tenant public \
     --namespace default \
-    --name ExclamationFunctio6 \
+    --name ExclamationFunctio6
 ```
 
 The output is shown as follows:
diff --git a/site2/docs/functions-debug-localrun.md b/site2/docs/functions-debug-localrun.md
index 06dc8a618ec..10562a920f4 100644
--- a/site2/docs/functions-debug-localrun.md
+++ b/site2/docs/functions-debug-localrun.md
@@ -16,9 +16,15 @@ Before using localrun mode, you need to add the following dependency.
 
 ```xml
 <dependency>
-   <groupId>org.apache.pulsar</groupId>
-   <artifactId>pulsar-functions-local-runner</artifactId>
-   <version>${pulsar.version}</version>
+    <groupId>org.apache.pulsar</groupId>
+    <artifactId>pulsar-functions-local-runner-original</artifactId>
+    <version>${pulsar.version}</version>
+</dependency>
+
+<dependency>
+    <groupId>com.google.protobuf</groupId>
+    <artifactId>protobuf-java</artifactId>
+    <version>3.21.9</version>
 </dependency>
 ```
 
diff --git a/site2/docs/getting-started-docker.md b/site2/docs/getting-started-docker.md
index 1c4f01600a0..f8afda94b82 100644
--- a/site2/docs/getting-started-docker.md
+++ b/site2/docs/getting-started-docker.md
@@ -13,13 +13,21 @@ If you have not installed Docker, download the [Community edition](https://www.d
 For macOS, Linux, and Windows, run the following command to start Pulsar within a Docker container.
 
 ```shell
-docker run -it -p 6650:6650  -p 8080:8080 --mount source=pulsardata,target=/pulsar/data --mount source=pulsarconf,target=/pulsar/conf apachepulsar/pulsar:@pulsar:version@ bin/pulsar standalone
+docker run -it -p 6650:6650 -p 8080:8080 \
+    --mount source=pulsardata,target=/pulsar/data \
+    --mount source=pulsarconf,target=/pulsar/conf \
+    apachepulsar/pulsar:@pulsar:version@ bin/pulsar standalone
 ```
 
 If you want to change Pulsar configurations and start Pulsar, run the following command by passing environment variables with the `PULSAR_PREFIX_` prefix. See [default configuration file](https://github.com/apache/pulsar/blob/e6b12c64b043903eb5ff2dc5186fe8030f157cfc/conf/standalone.conf) for more details.
 
 ```shell
-docker run -it -e PULSAR_PREFIX_xxx=yyy -p 6650:6650  -p 8080:8080 --mount source=pulsardata,target=/pulsar/data --mount source=pulsarconf,target=/pulsar/conf apachepulsar/pulsar:2.10.0 sh -c "bin/apply-config-from-env.py conf/standalone.conf && bin/pulsar standalone"
+docker run -it -e PULSAR_PREFIX_xxx=yyy \
+    -p 6650:6650  -p 8080:8080 \
+    --mount source=pulsardata,target=/pulsar/data \
+    --mount source=pulsarconf,target=/pulsar/conf \
+    apachepulsar/pulsar:2.10.0 \
+    sh -c "bin/apply-config-from-env.py conf/standalone.conf && bin/pulsar standalone"
 ```
 
 :::tip
@@ -70,8 +78,7 @@ Create a consumer and subscribe to the topic:
 import pulsar
 
 client = pulsar.Client('pulsar://localhost:6650')
-consumer = client.subscribe('my-topic',
-                            subscription_name='my-sub')
+consumer = client.subscribe('my-topic', subscription_name='my-sub')
 
 while True:
     msg = consumer.receive()
diff --git a/site2/docs/how-to-landing.md b/site2/docs/how-to-landing.md
index 90c47b64b6b..93a627945e3 100644
--- a/site2/docs/how-to-landing.md
+++ b/site2/docs/how-to-landing.md
@@ -1,7 +1,6 @@
 ---
 Id: how-to-landing
 title: How-to
-sidebar_label: “”
 ---
 
 
diff --git a/site2/docs/install-deploy-upgrade-landing.md b/site2/docs/install-deploy-upgrade-landing.md
index 5751dca2eb5..b7fe6c1455d 100644
--- a/site2/docs/install-deploy-upgrade-landing.md
+++ b/site2/docs/install-deploy-upgrade-landing.md
@@ -1,7 +1,7 @@
 ---
 Id: install-deploy-upgrade-landing
 title: Install, Deploy and Upgrade Pulsar
-sidebar_label: “Tutorials”
+sidebar_label: "Tutorials"
 ---
 
 
diff --git a/site2/docs/io-overview.md b/site2/docs/io-overview.md
index ed6b6dc95fb..915cf6fe909 100644
--- a/site2/docs/io-overview.md
+++ b/site2/docs/io-overview.md
@@ -81,8 +81,8 @@ Take **Admin CLI** as an example. For more information about **REST API** or **J
 
 ```bash
 bin/pulsar-admin sources create \
---processing-guarantees ATMOST_ONCE \
-# Other source configs
+    --processing-guarantees ATMOST_ONCE \
+    # Other source configs
 ```
 
 For more information about the options of `pulsar-admin sources create`, see [here](reference-connector-admin.md).
@@ -92,8 +92,8 @@ For more information about the options of `pulsar-admin sources create`, see [he
 
 ```bash
 bin/pulsar-admin sinks create \
---processing-guarantees EFFECTIVELY_ONCE \
-# Other sink configs
+    --processing-guarantees EFFECTIVELY_ONCE \
+    # Other sink configs
 ```
 
 For more information about the options of `pulsar-admin sinks create`, see [here](reference-connector-admin.md).
@@ -124,8 +124,8 @@ Take **Admin CLI** as an example. For more information about **REST API** or **J
 
 ```bash
 bin/pulsar-admin sources update \
---processing-guarantees EFFECTIVELY_ONCE \
-# Other source configs
+    --processing-guarantees EFFECTIVELY_ONCE \
+    # Other source configs
 ```
 
 For more information about the options of `pulsar-admin sources update`, see [here](reference-connector-admin.md).
@@ -135,8 +135,8 @@ For more information about the options of `pulsar-admin sources update`, see [he
 
 ```bash
 bin/pulsar-admin sinks update \
---processing-guarantees ATMOST_ONCE \
-# Other sink configs
+    --processing-guarantees ATMOST_ONCE \
+    # Other sink configs
 ```
 
 For more information about the options of `pulsar-admin sinks update`, see [here](reference-connector-admin.md).
diff --git a/site2/docs/io-quickstart.md b/site2/docs/io-quickstart.md
index 29867cfe336..859443b00c9 100644
--- a/site2/docs/io-quickstart.md
+++ b/site2/docs/io-quickstart.md
@@ -26,11 +26,7 @@ Before connecting Pulsar to a database, you need to install Pulsar and the desir
 
 Read [Run a standalone Pulsar cluster locally](getting-started-standalone.md) for downloading the Pulsar distribution.
 
-Pulsar releases a separate binary distribution to contain all the built-in connectors. To enable those connectors, you need to download the connectors tarball release:
-
-```bash
-wget pulsar:connector_release_url/{connector}-@pulsar:version@.nar
-```
+To enable Pulsar connectors, you need to download the connectors' tarball release on [download page](https://pulsar.apache.org/download/).
 
 After you download the NAR file, copy the file to the `connectors` directory in the Pulsar directory. For example, if you download the `pulsar-io-aerospike-@pulsar:version@.nar` connector file, enter the following commands:
 
@@ -434,14 +430,14 @@ This example uses the PostgreSQL 12 docker image to start a single-node PostgreS
 
 2. Start PostgreSQL.
 
-   ```bash
-   docker run -d -it --rm \
-   --name pulsar-postgres \
-   -p 5432:5432 \
-   -e POSTGRES_PASSWORD=password \
-   -e POSTGRES_USER=postgres \
-   postgres:12
-   ```
+    ```bash
+    docker run -d -it --rm \
+        --name pulsar-postgres \
+        -p 5432:5432 \
+        -e POSTGRES_PASSWORD=password \
+        -e POSTGRES_USER=postgres \
+        postgres:12
+    ```
 
 3. Check if PostgreSQL has been started successfully.
 
@@ -551,11 +547,11 @@ This example creates a sink connector and specifies the desired information.
 
 ```bash
 bin/pulsar-admin sinks create \
---archive ./connectors/pulsar-io-jdbc-postgres-@pulsar:version@.nar \
---inputs pulsar-postgres-jdbc-sink-topic \
---name pulsar-postgres-jdbc-sink \
---sink-config-file ./connectors/pulsar-postgres-jdbc-sink.yaml \
---parallelism 1
+    --archive ./connectors/pulsar-io-jdbc-postgres-@pulsar:version@.nar \
+    --inputs pulsar-postgres-jdbc-sink-topic \
+    --name pulsar-postgres-jdbc-sink \
+    --sink-config-file ./connectors/pulsar-postgres-jdbc-sink.yaml \
+    --parallelism 1
 ```
 
 Once the command is executed, Pulsar creates a sink connector _pulsar-postgres-jdbc-sink_.
@@ -591,11 +587,11 @@ to monitor a connector and perform other operations on it.
 
 * List all running JDBC sink(s).
 
-  ```bash
-  bin/pulsar-admin sinks list \
-  --tenant public \
-  --namespace default
-  ```
+    ```bash
+    bin/pulsar-admin sinks list \
+        --tenant public \
+        --namespace default
+    ```
 
   :::tip
 
@@ -613,12 +609,12 @@ to monitor a connector and perform other operations on it.
 
 * Get the information of a JDBC sink.
 
-  ```bash
-  bin/pulsar-admin sinks get \
-  --tenant public \
-  --namespace default \
-  --name pulsar-postgres-jdbc-sink
-  ```
+    ```bash
+    bin/pulsar-admin sinks get \
+      --tenant public \
+      --namespace default \
+      --name pulsar-postgres-jdbc-sink
+    ```
 
   :::tip
 
@@ -656,9 +652,9 @@ to monitor a connector and perform other operations on it.
 
   ```bash
   bin/pulsar-admin sinks status \
-  --tenant public \
-  --namespace default \
-  --name pulsar-postgres-jdbc-sink
+    --tenant public \
+    --namespace default \
+    --name pulsar-postgres-jdbc-sink
   ```
 
   :::tip
@@ -698,9 +694,9 @@ You can use the [Connector Admin CLI](/tools/pulsar-admin/) to stop a connector
 
 ```bash
 bin/pulsar-admin sinks stop \
---tenant public \
---namespace default \
---name pulsar-postgres-jdbc-sink
+    --tenant public \
+    --namespace default \
+    --name pulsar-postgres-jdbc-sink
 ```
 
 :::tip
@@ -721,9 +717,9 @@ You can use the [Connector Admin CLI](/tools/pulsar-admin/) to restart a connect
 
 ```bash
 bin/pulsar-admin sinks restart \
---tenant public \
---namespace default \
---name pulsar-postgres-jdbc-sink
+    --tenant public \
+    --namespace default \
+    --name pulsar-postgres-jdbc-sink
 ```
 
 :::tip
@@ -754,8 +750,8 @@ This example updates the parallelism of the _pulsar-postgres-jdbc-sink_ sink con
 
 ```bash
 bin/pulsar-admin sinks update \
---name pulsar-postgres-jdbc-sink \
---parallelism 2
+    --name pulsar-postgres-jdbc-sink \
+    --parallelism 2
 ```
 
 :::tip
@@ -774,9 +770,9 @@ This example double-checks the information.
 
 ```bash
 bin/pulsar-admin sinks get \
---tenant public \
---namespace default \
---name pulsar-postgres-jdbc-sink
+    --tenant public \
+    --namespace default \
+    --name pulsar-postgres-jdbc-sink
 ```
 
 The result shows that the parallelism is 2.
@@ -814,9 +810,9 @@ This example deletes the _pulsar-postgres-jdbc-sink_ sink connector.
 
 ```bash
 bin/pulsar-admin sinks delete \
---tenant public \
---namespace default \
---name pulsar-postgres-jdbc-sink
+    --tenant public \
+    --namespace default \
+    --name pulsar-postgres-jdbc-sink
 ```
 
 :::tip
@@ -835,9 +831,9 @@ This example double-checks the status of the sink connector.
 
 ```bash
 bin/pulsar-admin sinks get \
---tenant public \
---namespace default \
---name pulsar-postgres-jdbc-sink
+    --tenant public \
+    --namespace default \
+    --name pulsar-postgres-jdbc-sink
 ```
 
 The result shows that the sink connector does not exist.
diff --git a/site2/docs/schema-overview.md b/site2/docs/schema-overview.md
index 9560a95443f..52843fc9a01 100644
--- a/site2/docs/schema-overview.md
+++ b/site2/docs/schema-overview.md
@@ -28,7 +28,7 @@ Currently, Pulsar schema is only available for the [Java client](client-librarie
 Type safety is extremely important in any application built around a messaging and streaming system. Raw bytes are flexible for data transfer, but the flexibility and neutrality come with a cost: you have to overlay data type checking and serialization/deserialization to ensure that the bytes fed into the system can be read and successfully consumed. In other words, you need to make sure the data intelligible and usable to applications.
 
 Pulsar schema resolves the pain points with the following capabilities:
-* enforces the data type safety when a topic has a schema defined. As a result, producers/consumers are only allowed to connect if they are using a “compatible” schema.
+* enforces the data type safety when a topic has a schema defined. As a result, producers/consumers are only allowed to connect if they are using a "compatible" schema.
 * provides a central location for storing information about the schemas used within your organization, in turn greatly simplifies the sharing of this information across application teams.
 * serves as a single source of truth for all the message schemas used across all your services and development teams, which makes it easier for them to collaborate.
 * keeps data compatibility on-track between schema versions. When new schemas are uploaded, the new versions can be read by old consumers. 
diff --git a/site2/docs/security-authorization.md b/site2/docs/security-authorization.md
index 2b0d9016c62..a9c286b6a63 100644
--- a/site2/docs/security-authorization.md
+++ b/site2/docs/security-authorization.md
@@ -62,8 +62,8 @@ The following is an example tenant creation command:
 
 ```shell
 bin/pulsar-admin tenants create my-tenant \
---admin-roles my-admin-role \
---allowed-clusters us-west,us-east
+    --admin-roles my-admin-role \
+    --allowed-clusters us-west,us-east
 ```
 
 This command creates a new tenant `my-tenant` that is allowed to use the clusters `us-west` and `us-east`.
diff --git a/site2/docs/security-oauth2.md b/site2/docs/security-oauth2.md
index bd994e26419..a7b36bdb180 100644
--- a/site2/docs/security-oauth2.md
+++ b/site2/docs/security-oauth2.md
@@ -183,11 +183,11 @@ This section describes how to use Pulsar CLI tools to connect a cluster through
 
 ```shell
 bin/pulsar-admin --admin-url https://streamnative.cloud:443 \
---auth-plugin org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 \
---auth-params '{"privateKey":"file:///path/to/key/file.json",
-    "issuerUrl":"https://dev-kt-aa9ne.us.auth0.com",
-    "audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"}' \
-tenants list
+    --auth-plugin org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 \
+    --auth-params '{"privateKey":"file:///path/to/key/file.json",
+        "issuerUrl":"https://dev-kt-aa9ne.us.auth0.com",
+        "audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"}' \
+    tenants list
 ```
 
 </TabItem>
@@ -195,12 +195,12 @@ tenants list
 
 ```shell
 bin/pulsar-client \
---url SERVICE_URL \
---auth-plugin org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 \
---auth-params '{"privateKey":"file:///path/to/key/file.json",
-    "issuerUrl":"https://dev-kt-aa9ne.us.auth0.com",
-    "audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"}' \
-produce test-topic -m "test-message" -n 10
+    --url SERVICE_URL \
+    --auth-plugin org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 \
+    --auth-params '{"privateKey":"file:///path/to/key/file.json",
+        "issuerUrl":"https://dev-kt-aa9ne.us.auth0.com",
+        "audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"}' \
+    produce test-topic -m "test-message" -n 10
 ```
 
 </TabItem>
@@ -208,11 +208,11 @@ produce test-topic -m "test-message" -n 10
 
 ```shell
 bin/pulsar-perf produce --service-url pulsar+ssl://streamnative.cloud:6651 \
---auth-plugin org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 \
---auth-params '{"privateKey":"file:///path/to/key/file.json",
-    "issuerUrl":"https://dev-kt-aa9ne.us.auth0.com",
-    "audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"}' \
--r 1000 -s 1024 test-topic
+    --auth-plugin org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2 \
+    --auth-params '{"privateKey":"file:///path/to/key/file.json",
+        "issuerUrl":"https://dev-kt-aa9ne.us.auth0.com",
+        "audience":"https://dev-kt-aa9ne.us.auth0.com/api/v2/"}' \
+    -r 1000 -s 1024 test-topic
 ```
 
 </TabItem>
diff --git a/site2/docs/security-tls-transport.md b/site2/docs/security-tls-transport.md
index 87749959f3e..cbe586d6f8b 100644
--- a/site2/docs/security-tls-transport.md
+++ b/site2/docs/security-tls-transport.md
@@ -73,23 +73,23 @@ You can use a certificate authority (CA) to sign both server and client certific
 
 Use the following command to create a CA.
 
-   ```bash
-   openssl genrsa -out ca.key.pem 2048
-   openssl req -x509 -new -nodes -key ca.key.pem -subj "/CN=CARoot" -days 365 -out ca.cert.pem
-   ```
+```bash
+openssl genrsa -out ca.key.pem 2048
+openssl req -x509 -new -nodes -key ca.key.pem -subj "/CN=CARoot" -days 365 -out ca.cert.pem
+```
 
-   :::note
+:::note
 
-   The default `openssl` on macOS doesn't work for the commands above. You need to upgrade `openssl` via Homebrew:
+The default `openssl` on macOS doesn't work for the commands above. You need to upgrade `openssl` via Homebrew:
 
-   ```bash
-   brew install openssl
-   export PATH="/usr/local/Cellar/openssl@3/3.0.1/bin:$PATH"
-   ```
+```bash
+brew install openssl
+export PATH="/usr/local/Cellar/openssl@3/3.0.1/bin:$PATH"
+```
 
-   Use the actual path from the output of the `brew install` command. Note that version number `3.0.1` might change. 
+Use the actual path from the output of the `brew install` command. Note that version number `3.0.1` might change. 
 
-   :::
+:::
 
 #### Create a server certificate
 
diff --git a/site2/docs/tutorials-namespace.md b/site2/docs/tutorials-namespace.md
index 6caa4e784fb..3c9daa2bb83 100644
--- a/site2/docs/tutorials-namespace.md
+++ b/site2/docs/tutorials-namespace.md
@@ -1,7 +1,7 @@
 ---
 Id: tutorials-namespace
 title: How to create a namespace
-sidebar_label: “Tutorials”
+sidebar_label: "Tutorials"
 ---
 
 
diff --git a/site2/docs/tutorials-produce-consume.md b/site2/docs/tutorials-produce-consume.md
index dd333f5c73d..7ddf52c024f 100644
--- a/site2/docs/tutorials-produce-consume.md
+++ b/site2/docs/tutorials-produce-consume.md
@@ -1,7 +1,7 @@
 ---
 Id: tutorials-produce-consume
 title: Produce and consume messages
-sidebar_label: “Tutorials”
+sidebar_label: "Tutorials"
 ---
 
 In this tutorial, we will:
diff --git a/site2/docs/tutorials-tenant.md b/site2/docs/tutorials-tenant.md
index 92192797d89..744d88d821d 100644
--- a/site2/docs/tutorials-tenant.md
+++ b/site2/docs/tutorials-tenant.md
@@ -1,13 +1,13 @@
 ---
 Id: tutorials-tenant
 title: How to set up a tenant
-sidebar_label: “Tutorials”
+sidebar_label: "Tutorials"
 ---
 
 
 Pulsar is a powerful messaging system you can use to process and route high volumes of data. Each tenant provides a distinct unit of isolation with its own set of roles, permissions, configuration settings, and bookmarks. 
 
-In this tutorial, you will create a new tenant, named “apache” in your Pulsar cluster, hosted in K8s helm. 
+In this tutorial, you will create a new tenant, named "apache" in your Pulsar cluster, hosted in K8s helm. 
 
 To create a tenant:
 
diff --git a/site2/docs/tutorials-topic.md b/site2/docs/tutorials-topic.md
index e0ebc8fbfea..812370d6ea1 100644
--- a/site2/docs/tutorials-topic.md
+++ b/site2/docs/tutorials-topic.md
@@ -1,7 +1,7 @@
 ---
 Id: tutorials-topic
 title: How to create a topic
-sidebar_label: “Tutorials”
+sidebar_label: "Tutorials"
 ---