ashishkumar50 commented on code in PR #4876:
URL: https://github.com/apache/ozone/pull/4876#discussion_r1233928051


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java:
##########
@@ -498,72 +535,138 @@ private List<ContainerBlockMetadata> getBlocks(
     return blockIds;
   }
 
+  /**
+   * Retrieves the container mismatch insights.
+   *
+   * This method returns a list of ContainerDiscrepancyInfo objects 
representing
+   * the containers that are missing in either the Ozone Manager (OM) or the
+   * Storage Container Manager (SCM), based on the provided filter parameter.
+   * The returned list is paginated based on the provided limit and prevKey
+   * parameters.
+   *
+   * @param limit   The maximum number of container discrepancies to return.
+   * @param prevKey The container ID after which the results are returned.
+   * @param missingIn  The missing filter parameter to specify if it's
+   *                   "OM" or "SCM" missing containers to be returned.
+   */
   @GET
   @Path("/mismatch")
-  public Response getContainerMisMatchInsights() {
+  public Response getContainerMisMatchInsights(
+      @DefaultValue(DEFAULT_FETCH_COUNT)
+      @QueryParam(RECON_QUERY_LIMIT) int limit,
+      @DefaultValue(PREV_CONTAINER_ID_DEFAULT_VALUE)
+      @QueryParam(RECON_QUERY_PREVKEY) long prevKey,
+      @DefaultValue(DEFAULT_FILTER_FOR_MISSING_CONTAINERS)
+      @QueryParam(RECON_QUERY_FILTER) String missingIn) {
+    if (prevKey < 0 || limit < 0) {

Review Comment:
   You changed description as "If prevKey is 0 or negative, we return 
`NOT_ACCEPTABLE`"
   But this is applicable only for negative `prevKey`. For 0 already it was 
correct before, it returns sublist from start of the list.



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