Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][doc] improve and fix admin interface doc #18526

Merged
merged 9 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 45 additions & 12 deletions site2/docs/admin-api-brokers.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ Fetch all available active brokers that are serving traffic with cluster name.

```shell
pulsar-admin brokers list use
broker1.use.org.com:8080
```

Example output:

```shell
localhost:8080
```

</TabItem>
Expand Down Expand Up @@ -83,7 +88,14 @@ Fetch the information of the leader broker, for example, the service url.

```shell
pulsar-admin brokers leader-broker
BrokerInfo(serviceUrl=broker1.use.org.com:8080)
```

Example output:

```shell
{
"serviceUrl" : "http://localhost:8080"
}
```

</TabItem>
Expand Down Expand Up @@ -117,15 +129,20 @@ It finds all namespaces which are owned and served by a given broker.

```shell
pulsar-admin brokers namespaces use \
--url broker1.use.org.com:8080
--url localhost:8080
```

{
"my-property/use/my-ns/0x00000000_0xffffffff": {
"broker_assignment": "shared",
"is_controlled": false,
"is_active": true
}
}
Example output:

```shell
labuladong marked this conversation as resolved.
Show resolved Hide resolved
public/default/0x00000000_0x40000000 [broker_assignment=shared is_controlled=false is_active=true]
public/default/0xc0000000_0xffffffff [broker_assignment=shared is_controlled=false is_active=true]
public/functions/0x40000000_0x80000000 [broker_assignment=shared is_controlled=false is_active=true]
public/functions/0x00000000_0x40000000 [broker_assignment=shared is_controlled=false is_active=true]
pulsar/standalone/localhost:8080/0x00000000_0xffffffff [broker_assignment=shared is_controlled=false is_active=true]
pulsar/localhost:8080/0x00000000_0xffffffff [broker_assignment=shared is_controlled=false is_active=true]
public/functions/0x80000000_0xc0000000 [broker_assignment=shared is_controlled=false is_active=true]
public/default/0x80000000_0xc0000000 [broker_assignment=shared is_controlled=false is_active=true]
```

</TabItem>
Expand Down Expand Up @@ -197,7 +214,19 @@ Fetch a list of all potentially updatable configuration parameters.

```shell
pulsar-admin brokers list-dynamic-config
brokerShutdownTimeoutMs
```

Example output:

```shell
forceDeleteNamespaceAllowed
loadBalancerMemoryResourceWeight
allowAutoTopicCreation
brokerDeleteInactivePartitionedTopicMetadataEnabled
managedLedgerInactiveLedgerRolloverTimeSeconds
loadBalancerNamespaceBundleMaxMsgRate
resourceUsageTransportPublishIntervalInSecs
# omit...
```

</TabItem>
Expand Down Expand Up @@ -229,7 +258,11 @@ Fetch a list of all parameters that have been dynamically updated.

```shell
pulsar-admin brokers get-all-dynamic-config
brokerShutdownTimeoutMs:100
```
Example output:

```shell
brokerShutdownTimeoutMs 100
```

</TabItem>
Expand Down
20 changes: 14 additions & 6 deletions site2/docs/admin-api-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ You can provision a new cluster using the [`create`](/tools/pulsar-admin/) subco

```shell
pulsar-admin clusters create cluster-1 \
--url http://my-cluster.org.com:8080 \
--broker-url pulsar://my-cluster.org.com:6650
--url http://my-cluster.org.com:8080 \
--broker-url pulsar://my-cluster.org.com:6650
```

</TabItem>
Expand Down Expand Up @@ -128,6 +128,10 @@ Use the [`get`](/tools/pulsar-admin/) subcommand and specify the name of the clu

```shell
pulsar-admin clusters get cluster-1
```
Output:

```shell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```shell
```json

{
"serviceUrl": "http://my-cluster.org.com:8080/",
"serviceUrlTls": null,
Expand Down Expand Up @@ -168,8 +172,8 @@ Use the [`update`](/tools/pulsar-admin/) subcommand and specify new configuratio

```shell
pulsar-admin clusters update cluster-1 \
--url http://my-cluster.org.com:4081 \
--broker-url pulsar://my-cluster.org.com:3350
--url http://my-cluster.org.com:4081 \
--broker-url pulsar://my-cluster.org.com:3350
```

</TabItem>
Expand Down Expand Up @@ -242,10 +246,14 @@ Use the [`list`](/tools/pulsar-admin/) subcommand.

```shell
pulsar-admin clusters list
```

Output:

```shell
labuladong marked this conversation as resolved.
Show resolved Hide resolved
cluster-1
cluster-2
```

</TabItem>
<TabItem value="REST API">

Expand Down Expand Up @@ -275,7 +283,7 @@ Peer clusters can be configured for a given cluster in a Pulsar [instance](refer

Use the [`update-peer-clusters`](/tools/pulsar-admin/) subcommand and specify the list of peer-cluster names.

```
```shell
pulsar-admin update-peer-clusters cluster-1 --peer-clusters cluster-2
```

Expand Down
Loading