Skip to content

Commit

Permalink
[fix][doc] improve and fix admin interface doc (apache#18526)
Browse files Browse the repository at this point in the history
Co-authored-by: tison <wander4096@gmail.com>
  • Loading branch information
2 people authored and lifepuzzlefun committed Dec 9, 2022
1 parent b12bc2c commit 230a0d3
Show file tree
Hide file tree
Showing 11 changed files with 505 additions and 397 deletions.
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:
```
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:
```json
{
"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:
```
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:
```
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:
```
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:
```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:
```
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

0 comments on commit 230a0d3

Please sign in to comment.