priyeshkaratha commented on code in PR #9252:
URL: https://github.com/apache/ozone/pull/9252#discussion_r2502314745


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -744,6 +767,28 @@ public Response getDeletedDirectorySummary() {
     return Response.ok(dirSummary).build();
   }
 
+  /**
+   * Retrieves the summary of the total delete pending directory size 
(unreplicated and replicated).
+   *
+   * @return The HTTP response body includes a map with the following entries:
+   * - "totalDataSize": the total replicated size of delete pending 
directories.
+   * - "totalReplicatedDataSize": the total unreplicated size of delete 
pending directories.
+   *
+   * Example response:
+   *   {
+   *    "totalDataSize": 30000,
+   *    "totalReplicatedDataSize": 90000
+   *   }
+   */
+  @GET
+  @Path("/deletePending/dirs/size-summary")

Review Comment:
   I think we can close this PR. Instead of maintaining two separate methods, 
we can simplify the logic by passing limit = -1 when we want to retrieve all 
results. Inside the 
[loop](https://github.com/apache/ozone/blob/155c0284384b6b44fdb73bf6d000bc8540351044/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java#L629-L630),
 we can add a check like `if (limit > 0 && resultSize == limit)` to break when 
the limit is reached . This way, the same method can handle both limited and 
complete results without additional code duplication.



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