You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "momo-jun (via GitHub)" <gi...@apache.org> on 2023/03/28 06:56:06 UTC

[GitHub] [pulsar-site] momo-jun commented on a diff in pull request #493: [improve][doc] Optimize Admin API > Features > Brokers

momo-jun commented on code in PR #493:
URL: https://github.com/apache/pulsar-site/pull/493#discussion_r1150109373


##########
docs/admin-api-brokers.md:
##########
@@ -87,39 +69,53 @@ Fetch the information of the leader broker, for example, the service url.
 <TabItem value="pulsar-admin">
 
 ```shell
-pulsar-admin brokers leader-broker
+pulsar-admin brokers namespaces use \
+    --url localhost:8080
 ```
 
 Example output:
 
-```json
-{
-  "serviceUrl" : "http://localhost:8080"
-}
+```
+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>
 <TabItem value="REST API">
 
-{@inject: endpoint|GET|/admin/v2/brokers/leaderBroker|operation/getLeaderBroker?version=@pulsar:version_number@}
+{@inject: endpoint|GET|/admin/v2/brokers/:cluster/:broker/ownedNamespaces|operation/getOwnedNamespaes?version=@pulsar:version_number@}
 
 </TabItem>
 <TabItem value="Java">
 
 ```java
-admin.brokers().getLeaderBroker()
+admin.brokers().getOwnedNamespaces(cluster,brokerUrl);
 ```
 
-For the detail of the code above, see [here](https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BrokersImpl.java#L80)
-
 </TabItem>
 
 </Tabs>
 ````
 
-#### list of namespaces owned by a given broker
+## Update broker conf 
+
+You can update broker configurations using one of the following ways:
 
-It finds all namespaces which are owned and served by a given broker.
+- Supply [configurations](https://pulsar.apache.org/reference/#/@pulsar:version_origin@/config/reference-configuration-broker) when starting up brokers.

Review Comment:
   ```suggestion
   - Supply [configurations](pathname:///reference/#/@pulsar:version_origin@/config/reference-configuration-broker) when starting up brokers.
   ```



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org