sodonnel opened a new pull request, #3344:
URL: https://github.com/apache/ozone/pull/3344

   ## What changes were proposed in this pull request?
   
   Currently the ReportSubCommand provides a summary of the last 
replicationManager run on the client, but it does not provide a JSON output 
option. We should allow for JSON output to ensure compatibility and so the 
output can be consumed programmatically. 
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6635
   
   ## How was this patch tested?
   
   New unit tests and validated the output in a docker-compose cluster:
   
   ```
   {
   bash-4.2$ ozone admin container report --json
     "reportTimeStamp" : 1650892128769,
     "stats" : {
       "CLOSING" : 0,
       "CLOSED" : 3,
       "DELETING" : 0,
       "DELETED" : 0,
       "MISSING" : 0,
       "OPEN" : 1,
       "UNHEALTHY" : 0,
       "OPEN_UNHEALTHY" : 0,
       "QUASI_CLOSED_STUCK" : 0,
       "QUASI_CLOSED" : 0,
       "OVER_REPLICATED" : 0,
       "MIS_REPLICATED" : 0,
       "UNDER_REPLICATED" : 0,
       "EMPTY" : 0
     },
     "samples" : { }
   }
   ```
   
   With samples
   
   ```
   bash-4.2$ ozone admin container report --json
   {
     "reportTimeStamp" : 1650892728798,
     "stats" : {
       "CLOSING" : 0,
       "CLOSED" : 4,
       "DELETING" : 0,
       "DELETED" : 0,
       "MISSING" : 0,
       "OPEN" : 0,
       "UNHEALTHY" : 0,
       "OPEN_UNHEALTHY" : 0,
       "QUASI_CLOSED_STUCK" : 0,
       "QUASI_CLOSED" : 0,
       "OVER_REPLICATED" : 0,
       "MIS_REPLICATED" : 0,
       "UNDER_REPLICATED" : 4,
       "EMPTY" : 0
     },
     "samples" : {
       "UNDER_REPLICATED" : [ 1, 2, 3, 4 ]
     }
   }
   ```
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to