You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "kerneltime (via GitHub)" <gi...@apache.org> on 2023/01/23 05:17:59 UTC
[GitHub] [ozone] kerneltime commented on a diff in pull request #4158: HDDS-6056. Recon /containers endpoint should return SCM container data instead of OM container data.
kerneltime commented on code in PR #4158:
URL: https://github.com/apache/ozone/pull/4158#discussion_r1083653560
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java:
##########
@@ -112,21 +117,29 @@ public Response getContainers(
int limit,
@DefaultValue(PREV_CONTAINER_ID_DEFAULT_VALUE)
@QueryParam(RECON_QUERY_PREVKEY) long prevKey) {
- Map<Long, ContainerMetadata> containersMap;
- long containersCount;
- try {
- containersMap =
- reconContainerMetadataManager.getContainers(limit, prevKey);
- containersCount = reconContainerMetadataManager.getCountForContainers();
- } catch (IOException ioEx) {
- throw new WebApplicationException(ioEx,
- Response.Status.INTERNAL_SERVER_ERROR);
+ if (limit < 0 || prevKey < 0) {
+ // Send back an empty response
+ return Response.ok().build();
Review Comment:
Should the return here be something other than `ok` maybe `notAcceptable`?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org