You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/03 10:43:21 UTC

[GitHub] [pulsar] Jason918 opened a new pull request #10810: [broker] add brokerServiceUrl in TopicStats

Jason918 opened a new pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810


   <!--
   ### Contribution Checklist
     
     - Name the pull request in the form "[Issue XYZ][component] Title of the pull request", where *XYZ* should be replaced by the actual issue number.
       Skip *Issue XYZ* if there is no associated github issue for this pull request.
       Skip *component* if you are unsure about which is the best component. E.g. `[docs] Fix typo in produce method`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ### Motivation
   
   It's quite useful to get topic info with the cmd `bin/pulsar-admin topics stats <topic>` when doing some trouble shooting work.
   By adding brokerServiceUrl in TopicStats, we can save some trouble running another lookup cmd.
   
   ### Modifications
   
   Add brokerServiceUrl in class TopicStats. And assigned with the value `brokerService.pulsar().getBrokerServiceUrl()`
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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.

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



[GitHub] [pulsar] Anonymitaet commented on pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810#issuecomment-854295060






-- 
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.

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



[GitHub] [pulsar] Jason918 commented on pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Jason918 commented on pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810#issuecomment-855803295


   > I don't think the brokerServiceUrl should be part of a topic stats response or object. There are already ways to get this information.
   
   The owner broker of the topic may change during  two separate cmds, right? 
   And ... it's more efficient doing some trouble shooting work.
   


-- 
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.

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



[GitHub] [pulsar] Anonymitaet commented on a change in pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810#discussion_r645367435



##########
File path: site2/docs/admin-api-topics.md
##########
@@ -186,6 +186,8 @@ You can check the following statistics of a given non-partitioned topic.
   -   **averageMsgSize**: The average size (in bytes) of messages published within the last interval.
 
   -   **storageSize**: The sum of the ledgers' storage size for this topic. The space used to store the messages for the topic.
+  
+  -   **brokerServiceUrl**: The broker URL which is serving the given topic.

Review comment:
       ```suggestion
     -   **brokerServiceUrl**: The broker URL which serves a given topic.
   ```




-- 
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.

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



[GitHub] [pulsar] Jason918 commented on pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Jason918 commented on pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810#issuecomment-853776416






-- 
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.

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



[GitHub] [pulsar] Jason918 closed pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Jason918 closed pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810


   


-- 
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



[GitHub] [pulsar] Jason918 commented on pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Jason918 commented on pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810#issuecomment-853776416


   Hi @jiazhai , @codelipenghui , can you please take a look?


-- 
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.

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



[GitHub] [pulsar] Jason918 commented on pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Jason918 commented on pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810#issuecomment-855560215


   > > @Anonymitaet The docs for topic stats cmd is not in sync with the implementation. Maybe we should open new PR to complete the docs.
   > 
   > could you please add the docs? Then you can ping me to review, thanks.
   
   
   
   > Could you add a unit test to make sure it works?
   
   Added some simple tests in PartitionedTopicStatsTest.java and PartitionedTopicStatsTest.java 


-- 
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.

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



[GitHub] [pulsar] Anonymitaet commented on pull request #10810: [broker] add brokerServiceUrl in TopicStats

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #10810:
URL: https://github.com/apache/pulsar/pull/10810#issuecomment-854295060


   @Jason918 thanks for your contribution. For this PR, do we need to update docs?


-- 
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.

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