massakam opened a new pull request, #17136:
URL: https://github.com/apache/pulsar/pull/17136

   ### Motivation
   
   Add a new field named `ownerBroker` to topic stats. This is the hostname and 
port of the broker owning the topic, separated by a colon. This is the same 
name as the ephemeral node registered under `/loadbalance/brokers/` on 
ZooKeeper.
   ```json
   {
     "msgRateIn" : 0.0,
     "msgThroughputIn" : 0.0,
     "msgRateOut" : 0.0,
     "msgThroughputOut" : 0.0,
     ...
     "compaction" : {
       "lastCompactionRemovedEventCount" : 0,
       "lastCompactionSucceedTimestamp" : 0,
       "lastCompactionFailedTimestamp" : 0,
       "lastCompactionDurationTimeInMills" : 0
     },
     "ownerBroker" : "localhost:8080"
   }
   ```
   
   This is useful to know which broker owns the topic.
   
   ### Modifications
   
   Added a method `getLookupServiceAddress()` to the `PulsarService` class. 
This method returns a string consisting of the advertised address and web 
service port separated by a colon. The `asyncGetStats()` method of 
`PersistentTopic` and `NonPersistentTopic` sets the string returned from 
`PulsarService#getLookupServiceAddress()` to stats.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   ### Documentation
     
   - [ ] `doc`


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to