sodonnel opened a new pull request #1148: URL: https://github.com/apache/hadoop-ozone/pull/1148
## What changes were proposed in this pull request? This change provides two new endpoints on the Recon "containers" endpoint: /containers/unhealthy /containers/unhealthy/{state} The intention is for these endpoints to replace /containers/missing, but that end point is still in place as we need to change the front end of recon to use this new endpoint first. Calling either of the above new endpoints will return a summary of all unhealthy containers in the response, eg: ``` @JsonProperty("missingCount") private long missingCount = 0; @JsonProperty("underReplicatedCount") private long underReplicatedCount = 0; @JsonProperty("overReplicatedCount") private long overReplicatedCount = 0; @JsonProperty("misReplicatedCount") private long misReplicatedCount = 0; ``` Followed by either: * A list of all unhealthy containers, sorted by `container_id asc , state asc` for the /containers/unhealthy endpoint * A list of unhealthy containers in the passed state, sorted by `container_id asc , state asc` for the /containers/unhealthy/{state} endpoint Note that even when /containers/unhealthy/{state} is passed, the full summary of all containers is returned - it would be possible to only give a summary of the passed state, but I think it makes sense to give the full summary on all calls and just filter the list based on the passed parameter. For both endpoints, there is a parameter "limit" to control how many containers to return (default 1000) and "batchNum" starting a 1 to get each batch / page of results. The reason it does not use the previous container_id to start the next batch, is because there may be more than 1 database entry per container, and therefore we would need to pass preContainerId and preState. However it would be possible to change to use this if it is desired. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-3831 ## How was this patch tested? New unit tests ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org