Skip to content

Commit

Permalink
[fix][doc] fix many anchor errors
Browse files Browse the repository at this point in the history
  • Loading branch information
labuladong authored Oct 25, 2022
1 parent 573c8f6 commit 91562d2
Show file tree
Hide file tree
Showing 54 changed files with 111 additions and 111 deletions.
2 changes: 1 addition & 1 deletion site2/docs/admin-api-brokers.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ admin.brokers().getOwnedNamespaces(cluster,brokerUrl);

### Dynamic broker configuration

One way to configure a Pulsar [broker](reference-terminology.md#broker) is to supply a [configuration](reference-configuration.md#broker) when the broker is [started up](reference-cli-tools.md#pulsar-broker).
One way to configure a Pulsar [broker](reference-terminology.md#broker) is to supply a [configuration](reference-configuration.md#broker) when the broker is [started up](reference-cli-tools.md).

But since all broker configuration in Pulsar is stored in ZooKeeper, configuration values can also be dynamically updated *while the broker is running*. When you update broker configuration dynamically, ZooKeeper will notify the broker of the change and the broker will then override any existing configuration values.

Expand Down
4 changes: 2 additions & 2 deletions site2/docs/admin-api-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ You must initialize cluster metadata *before* starting up any [brokers](admin-ap
>
> Unlike most other admin functions in Pulsar, cluster metadata initialization cannot be performed via the admin REST API
> or the admin Java client, as metadata initialization involves communicating with ZooKeeper directly.
> Instead, you can use the [`pulsar`](reference-cli-tools.md#pulsar) CLI tool, in particular
> the [`initialize-cluster-metadata`](reference-cli-tools.md#pulsar-initialize-cluster-metadata) command.
> Instead, you can use the [`pulsar`](reference-cli-tools.md) CLI tool, in particular
> the [`initialize-cluster-metadata`](reference-cli-tools.md) command.
Here's an example cluster metadata initialization command:

Expand Down
2 changes: 1 addition & 1 deletion site2/docs/admin-api-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Pulsar allows you to grant namespace-level or topic-level permission to users.

- If you grant topic-level permission to a user, then the user can access only the topic.

The chapters below demonstrate how to grant namespace-level permissions to users. For how to grant topic-level permissions to users, see [manage topics](admin-api-topics.md/#grant-permission).
The chapters below demonstrate how to grant namespace-level permissions to users. For how to grant topic-level permissions to users, see [manage topics](admin-api-topics.md#grant-permission).

## Grant permissions

Expand Down
4 changes: 2 additions & 2 deletions site2/docs/administration-geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Geo-replication is managed at the namespace level, which means you only need to
Complete the following tasks to enable geo-replication for a namespace:

* [Enable a geo-replication namespace](#enable-geo-replication-at-namespace-level)
* [Configure that namespace to replicate across two or more provisioned clusters](admin-api-namespaces.md/#configure-replication-clusters)
* [Configure that namespace to replicate across two or more provisioned clusters](admin-api-namespaces.md#configure-replication-clusters)

Any message published on *any* topic in that namespace is replicated to all clusters in the specified set.

Expand Down Expand Up @@ -238,7 +238,7 @@ Consumer<String> consumer = client.newConsumer(Schema.STRING)

## Migrate data between clusters using geo-replication

Using geo-replication to migrate data between clusters is a special use case of the [active-active replication pattern](concepts-replication.md/#active-active-replication) when you don't have a large amount of data.
Using geo-replication to migrate data between clusters is a special use case of the [active-active replication pattern](concepts-replication.md#active-active-replication) when you don't have a large amount of data.

1. Create your new cluster.
2. Add the new cluster to your old cluster.
Expand Down
2 changes: 1 addition & 1 deletion site2/docs/administration-isolation-bookie.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Bookie isolation is controlled by BookKeeper clients. For Pulsar, there are two
* The bookie replication worker writes ledger replicas to target bookies according to the configured isolation policy.

To isolate bookies, you need to complete the following tasks.
1. Select a [data isolation policy](#understand-bookie-data-isolation-policies) based on your requirements.
1. Select a [data isolation policy](#understand-bookie-data-isolation-policy) based on your requirements.
2. [Enable the policy on BookKeeper clients](#enable-bookie-data-placement-policy).
3. [Configure the policy on bookie instances](#configure-data-placement-policy-on-bookie-instances).

Expand Down
2 changes: 1 addition & 1 deletion site2/docs/administration-isolation-broker.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ For how to set namespace isolation policy using Java admin API, see [code](https

:::tip

To guarantee all the data that belongs to a namespace is stored in desired bookies, you can isolate the data of the namespace into user-defined groups of bookies. See [configure bookie affinity groups](#configure-bookie-affinity-groups) for more details.
To guarantee all the data that belongs to a namespace is stored in desired bookies, you can isolate the data of the namespace into user-defined groups of bookies. See [configure bookie affinity groups](administration-isolation-bookie.md#configure-bookie-affinity-groups) for more details.

:::
6 changes: 3 additions & 3 deletions site2/docs/administration-isolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ The following illustration demonstrates the deployment of separate Pulsar cluste
![Deployment of separate Pulsar clusters](/assets/isolation-1.png)

Here are some key points for understanding how it works:
- Separate Pulsar clusters use a shared [configuration store](concepts-architecture-overview.md/#configuration-store).
- Separate Pulsar clusters use a shared [configuration store](concepts-architecture-overview.md#configuration-store).
- Each cluster exposes its service through a DNS entry point and makes sure a client can access the cluster through the DNS entry point. Clients can use one or multiple Pulsar URLs that the Pulsar cluster exposes as the service URL.
- Each Pulsar cluster has one or multiple brokers and bookies.
- Each Pulsar cluster has one metadata store, which can be separated into [Pulsar metadata store](concepts-architecture-overview.md/#metadata-store) and [BookKeeper metadata store](https://bookkeeper.apache.org/docs/latest/getting-started/concepts/#metadata-storage).
- Each Pulsar cluster has one metadata store, which can be separated into [Pulsar metadata store](concepts-architecture-overview.md#metadata-store) and [BookKeeper metadata store](https://bookkeeper.apache.org/docs/latest/getting-started/concepts/#metadata-storage).

:::note

Expand All @@ -52,7 +52,7 @@ The following illustration demonstrates the deployment of shared BookKeeper clus
![Deployment of shared BookKeeper cluster](/assets/isolation-2.png)

Here are some key points for understanding how it works:
- Separate Pulsar clusters share a BookKeeper cluster and a [configuration store](concepts-architecture-overview.md/#configuration-store).
- Separate Pulsar clusters share a BookKeeper cluster and a [configuration store](concepts-architecture-overview.md#configuration-store).
- Each cluster exposes its service through a DNS entry point and makes sure a client can access the cluster through the DNS entry point. Clients can use one or multiple Pulsar URLs that the Pulsar cluster exposes as the service URL.
- Each Pulsar cluster has one or multiple brokers.
- Each Pulsar cluster has one metadata store.
Expand Down
2 changes: 1 addition & 1 deletion site2/docs/administration-load-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Pulsar supports the following types of automatic load shedding strategies.
:::note

* From Pulsar 2.10, the **default** shedding strategy is `ThresholdShedder`.
* You need to restart brokers if the shedding strategy is [dynamically updated](admin-api-brokers.md/#dynamic-broker-configuration).
* You need to restart brokers if the shedding strategy is [dynamically updated](admin-api-brokers.md#dynamic-broker-configuration).

:::

Expand Down
12 changes: 6 additions & 6 deletions site2/docs/administration-zk-bk.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo 1 > data/zookeeper/myid

On `zk2.us-west.example.com` the command is `echo 2 > data/zookeeper/myid` and so on.

Once you add each server to the `zookeeper.conf` configuration and each server has the appropriate `myid` entry, you can start ZooKeeper on all hosts (in the background, using nohup) with the [`pulsar-daemon`](reference-cli-tools.md#pulsar-daemon) CLI tool:
Once you add each server to the `zookeeper.conf` configuration and each server has the appropriate `myid` entry, you can start ZooKeeper on all hosts (in the background, using nohup) with the [`pulsar-daemon`](reference-cli-tools.md) CLI tool:

```shell
bin/pulsar-daemon start zookeeper
Expand All @@ -68,7 +68,7 @@ If you deploy a [single-cluster](#single-cluster-pulsar-instance) instance, you

If your Pulsar instance consists of just one cluster, then you can deploy a configuration store on the same machines as the local ZooKeeper quorum but run on different TCP ports.

To deploy a ZooKeeper configuration store in a single-cluster instance, add the same ZooKeeper servers that the local quorum uses to the configuration file in [`conf/global_zookeeper.conf`](reference-configuration.md#configuration-store) using the same method for [local ZooKeeper](#local-zookeeper), but make sure to use a different port (2181 is the default for ZooKeeper). The following is an example that uses port 2184 for a three-node ZooKeeper cluster:
To deploy a ZooKeeper configuration store in a single-cluster instance, add the same ZooKeeper servers that the local quorum uses to the configuration file in [`conf/global_zookeeper.conf`](reference-configuration.md#configuration-store) using the same method for [local ZooKeeper](#deploy-local-zookeeper), but make sure to use a different port (2181 is the default for ZooKeeper). The following is an example that uses port 2184 for a three-node ZooKeeper cluster:

```properties
clientPort=2184
Expand Down Expand Up @@ -122,7 +122,7 @@ peerType=observer

##### Start the service

Once your configuration store configuration is in place, you can start up the service using [`pulsar-daemon`](reference-cli-tools.md#pulsar-daemon)
Once your configuration store configuration is in place, you can start up the service using [`pulsar-daemon`](reference-cli-tools.md)

```shell
bin/pulsar-daemon start configuration-store
Expand Down Expand Up @@ -201,19 +201,19 @@ BookKeeper provides [persistent message storage](concepts-architecture-overview.

You can start a bookie in the foreground or as a background daemon.

To start a bookie in the foreground, use the [`bookkeeper`](reference-cli-tools.md#bookkeeper) CLI tool:
To start a bookie in the foreground, use the [`bookkeeper`](reference-cli-tools.md) CLI tool:

```bash
bin/bookkeeper bookie
```

To start a bookie in the background, use the [`pulsar-daemon`](reference-cli-tools.md#pulsar-daemon) CLI tool:
To start a bookie in the background, use the [`pulsar-daemon`](reference-cli-tools.md) CLI tool:

```bash
bin/pulsar-daemon start bookie
```

You can verify whether the bookie works properly with the `bookiesanity` command for the [BookKeeper shell](reference-cli-tools.md#bookkeeper-shell):
You can verify whether the bookie works properly with the `bookiesanity` command for the [BookKeeper shell](reference-cli-tools.md):

```shell
bin/bookkeeper shell bookiesanity
Expand Down
2 changes: 1 addition & 1 deletion site2/docs/client-libraries-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pulsar+ssl://pulsar.us-west.example.com:6651

## Create a client

To interact with Pulsar, you need a [`Client`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#Client) object first. You can create a client object using the [`NewClient`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#NewClient) function, passing in a [`ClientOptions`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#ClientOptions) object (more on configuration [below](#client-configuration)). Here's an example:
To interact with Pulsar, you need a [`Client`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#Client) object first. You can create a client object using the [`NewClient`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#NewClient) function, passing in a [`ClientOptions`](https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#ClientOptions) object. Here's an example:

```go
import (
Expand Down
2 changes: 1 addition & 1 deletion site2/docs/client-libraries-websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ cryptoKeyReaderFactoryClassName=org.apache.pulsar.MyCryptoKeyReaderFactoryClassI

### Starting the broker

When the configuration is set, you can start the service using the [`pulsar-daemon`](reference-cli-tools.md#pulsar-daemon) tool:
When the configuration is set, you can start the service using the [`pulsar-daemon`](reference-cli-tools.md) tool:

```shell
bin/pulsar-daemon start websocket
Expand Down
6 changes: 3 additions & 3 deletions site2/docs/concepts-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ If no tenant or namespace is specified when a client creates a topic, the topic

## Namespaces

A namespace is a logical nomenclature within a tenant. A tenant creates namespaces via the [admin API](admin-api-namespaces.md#create). For instance, a tenant with different applications can create a separate namespace for each application. A namespace allows the application to create and manage a hierarchy of topics. The topic `my-tenant/app1` is a namespace for the application `app1` for `my-tenant`. You can create any number of [topics](#topics) under the namespace.
A namespace is a logical nomenclature within a tenant. A tenant creates namespaces via the [admin API](admin-api-namespaces.md#create-namespaces). For instance, a tenant with different applications can create a separate namespace for each application. A namespace allows the application to create and manage a hierarchy of topics. The topic `my-tenant/app1` is a namespace for the application `app1` for `my-tenant`. You can create any number of [topics](#topics) under the namespace.

## Subscriptions

Expand Down Expand Up @@ -712,7 +712,7 @@ After a consumer is created, the default subscription mode of the consumer is `D
</Tabs>
````

For how to create, check, or delete a durable subscription, see [manage subscriptions](admin-api-topics.md/#manage-subscriptions).
For how to create, check, or delete a durable subscription, see [manage subscriptions](admin-api-topics.md#manage-subscriptions).

## Multi-topic subscriptions

Expand Down Expand Up @@ -846,7 +846,7 @@ Non-persistent messaging is usually faster than persistent messaging because bro

Producers and consumers can connect to non-persistent topics in the same way as persistent topics, with the crucial difference that the topic name must start with `non-persistent`. All the subscription types---[exclusive](#exclusive), [shared](#shared), [key-shared](#key_shared) and [failover](#failover)---are supported for non-persistent topics.

Here's an example [Java consumer](client-libraries-java.md#consumers) for a non-persistent topic:
Here's an example [Java consumer](client-libraries-java.md#consumer) for a non-persistent topic:

```java
PulsarClient client = PulsarClient.builder()
Expand Down
4 changes: 2 additions & 2 deletions site2/docs/concepts-replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Pulsar provides a great degree of flexibility for customizing your replication s

### Full-mesh replication

Using full-mesh replication and applying the [selective message replication](administration-geo.md/#selective-replication), you can customize your replication strategies and topologies between any number of data centers.
Using full-mesh replication and applying the [selective message replication](administration-geo.md#selective-replication), you can customize your replication strategies and topologies between any number of data centers.

![An example of a full-mesh replication pattern](/assets/full-mesh-replication.svg)

Expand All @@ -53,7 +53,7 @@ Active-active replication is a variation of full-mesh replication, with only two

![An example of an active-active replication pattern](/assets/active-active-replication.svg)

For how to use active-active replication to migrate data between clusters, refer to [here](administration-geo.md/#migrate-data-between-clusters-using-geo-replication).
For how to use active-active replication to migrate data between clusters, refer to [here](administration-geo.md#migrate-data-between-clusters-using-geo-replication).

### Aggregation replication

Expand Down
4 changes: 2 additions & 2 deletions site2/docs/cookbooks-compaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Topic compaction
sidebar_label: "Topic compaction"
---

Pulsar's [topic compaction](concepts-topic-compaction.md#compaction) feature enables you to create **compacted** topics in which older, "obscured" entries are pruned from the topic, allowing for faster reads through the topic's history (which messages are deemed obscured/outdated/irrelevant will depend on your use case).
Pulsar's [topic compaction](concepts-topic-compaction.md#topic-compaction-example-the-stock-ticker) feature enables you to create **compacted** topics in which older, "obscured" entries are pruned from the topic, allowing for faster reads through the topic's history (which messages are deemed obscured/outdated/irrelevant will depend on your use case).

To use compaction:

Expand Down Expand Up @@ -49,7 +49,7 @@ bin/pulsar-admin topics compact \
persistent://my-tenant/my-namespace/my-topic
```

The `pulsar-admin` tool runs compaction via the Pulsar {@inject: rest:REST:/} API. To run compaction in its own dedicated process, i.e. *not* through the REST API, you can use the [`pulsar compact-topic`](reference-cli-tools.md#pulsar-compact-topic) command. Here's an example:
The `pulsar-admin` tool runs compaction via the Pulsar {@inject: rest:REST:/} API. To run compaction in its own dedicated process, i.e. *not* through the REST API, you can use the [`pulsar compact-topic`](reference-cli-tools.md) command. Here's an example:

```bash
bin/pulsar compact-topic \
Expand Down
6 changes: 3 additions & 3 deletions site2/docs/cookbooks-deduplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The instructions for Java, Python, and C++ clients are different.
values={[{"label":"Java clients","value":"Java clients"},{"label":"Python clients","value":"Python clients"},{"label":"C++ clients","value":"C++ clients"}]}>
<TabItem value="Java clients">
To ensure the guarantee order on a [Java producer](client-libraries-java.md#producers) sending to a topic with message deduplication enabled, set the producer name using the `producerName` setter, and set the timeout to `0` using the `sendTimeout` setter.
To ensure the guarantee order on a [Java producer](client-libraries-java.md#producer) sending to a topic with message deduplication enabled, set the producer name using the `producerName` setter, and set the timeout to `0` using the `sendTimeout` setter.
```java
import org.apache.pulsar.client.api.Producer;
Expand All @@ -104,7 +104,7 @@ Producer producer = pulsarClient.newProducer()
</TabItem>
<TabItem value="Python clients">
Not to break the guarantee order on a [Python producer](client-libraries-python.md#producers) sending to a topic with message deduplication active, set the producer name using `producer_name`, and set the timeout to `0` using `send_timeout_millis`.
Not to break the guarantee order on a [Python producer](client-libraries-python.md) sending to a topic with message deduplication active, set the producer name using `producer_name`, and set the timeout to `0` using `send_timeout_millis`.
```python
import pulsar
Expand All @@ -118,7 +118,7 @@ producer = client.create_producer(
</TabItem>
<TabItem value="C++ clients">
Not to break the guarantee order on a [C++ producer](client-libraries-cpp.md#producer) sending to a topic with message deduplication active, set the producer name using `producer_name`, and set the timeout to `0` using `send_timeout_millis`.
Not to break the guarantee order on a [C++ producer](client-libraries-cpp.md#create-a-producer) sending to a topic with message deduplication active, set the producer name using `producer_name`, and set the timeout to `0` using `send_timeout_millis`.
```cpp
#include <pulsar/Client.h>
Expand Down
Loading

0 comments on commit 91562d2

Please sign in to comment.