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 2019/06/28 12:58:05 UTC

[GitHub] [pulsar] massakam opened a new pull request #4639: [broker] Add perPartition parameter to partitioned-stats API

massakam opened a new pull request #4639: [broker] Add perPartition parameter to partitioned-stats API
URL: https://github.com/apache/pulsar/pull/4639
 
 
   ### Motivation
   
   Currently, the partitioned-stats API response includes stats for each partition. However, if the number of partitions and clients is large, the size of the response will be very large. In such cases, it is useful to have a query parameter to get a response that does not include stats for each partition.
   
   ```sh
   $ curl -s http://localhost:8080/admin/persistent/sample/standalone/ns1/pt1/partitioned-stats | jq .
   
   {
     "msgRateIn": 0,
     "msgThroughputIn": 0,
     "msgRateOut": 0,
     "msgThroughputOut": 0,
     "averageMsgSize": 0,
     "storageSize": 0,
     "publishers": [],
     "subscriptions": {
       "sub1": {
         "msgRateOut": 0,
         "msgThroughputOut": 0,
         "msgRateRedeliver": 0,
         "msgBacklog": 0,
         "blockedSubscriptionOnUnackedMsgs": false,
         "msgDelayed": 0,
         "unackedMessages": 0,
         "msgRateExpired": 0,
         "consumers": [],
         "isReplicated": false
       }
     },
     "replication": {},
     "metadata": {
       "partitions": 2
     },
     "partitions": {
       "persistent://sample/standalone/ns1/pt1-partition-1": {
         "msgRateIn": 0,
         "msgThroughputIn": 0,
         "msgRateOut": 0,
         "msgThroughputOut": 0,
         "averageMsgSize": 0,
         "storageSize": 0,
         "publishers": [],
         "subscriptions": {
           "sub1": {
             "msgRateOut": 0,
             "msgThroughputOut": 0,
             "msgRateRedeliver": 0,
             "msgBacklog": 0,
             "blockedSubscriptionOnUnackedMsgs": false,
             "msgDelayed": 0,
             "unackedMessages": 0,
             "msgRateExpired": 0,
             "consumers": [],
             "isReplicated": false
           }
         },
         "replication": {},
         "deduplicationStatus": "Disabled"
       },
       "persistent://sample/standalone/ns1/pt1-partition-0": {
         "msgRateIn": 0,
         "msgThroughputIn": 0,
         "msgRateOut": 0,
         "msgThroughputOut": 0,
         "averageMsgSize": 0,
         "storageSize": 0,
         "publishers": [],
         "subscriptions": {
           "sub1": {
             "msgRateOut": 0,
             "msgThroughputOut": 0,
             "msgRateRedeliver": 0,
             "msgBacklog": 0,
             "blockedSubscriptionOnUnackedMsgs": false,
             "msgDelayed": 0,
             "unackedMessages": 0,
             "msgRateExpired": 0,
             "consumers": [],
             "isReplicated": false
           }
         },
         "replication": {},
         "deduplicationStatus": "Disabled"
       }
     }
   }
   ```
   
   ### Modifications
   
   Added query parameter named `perPartition` to the partitioned-stats API. The default value is true.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.

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


With regards,
Apache Git Services