yuruguo opened a new pull request #12709:
URL: https://github.com/apache/pulsar/pull/12709


   ### Motivation
   Currently, we can get topic internal info through CLI `bin/pulsar-admin 
topics info-internal tn1/ns1/tp1`, but I find that what we get is an un 
unformatted and unreadable string, as below:
   ```
   
"{\"version\":0,\"partitions\":{\"persistent://pulsar/application-f75e774c-7e1e-405a-aa57-bfee90b93923/topic-partition-0\":{\"version\":0,\"creationDate\":\"2021-11-10T12:17:01.397+08:00\",\"modificationDate\":\"2021-11-10T12:17:01.397+08:00\",\"ledgers\":[],\"cursors\":{}},\"persistent://pulsar/application-f75e774c-7e1e-405a-aa57-bfee90b93923/topic-partition-1\":{\"version\":0,\"creationDate\":\"2021-11-10T12:17:01.414+08:00\",\"modificationDate\":\"2021-11-10T12:17:01.414+08:00\",\"ledgers\":[],\"cursors\":{}}}}"
   ```
   
   The purpose of this PR is to format topic internal info to make it clear and 
readable, as below:
   ```
   {
     "version": 0,
     "partitions": {
       
"persistent://pulsar/application-f75e774c-7e1e-405a-aa57-bfee90b93923/topic-partition-0":
 {
         "version": 0,
         "creationDate": "2021-11-10T12:17:01.397+08:00",
         "modificationDate": "2021-11-10T12:17:01.397+08:00",
         "ledgers": [],
         "cursors": {}
       },
       
"persistent://pulsar/application-f75e774c-7e1e-405a-aa57-bfee90b93923/topic-partition-1":
 {
         "version": 0,
         "creationDate": "2021-11-10T12:17:01.414+08:00",
         "modificationDate": "2021-11-10T12:17:01.414+08:00",
         "ledgers": [],
         "cursors": {}
       }
     }
   }
   ```
   
   ### Documentation
   - [x] `no-need-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