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


##########
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:
   @ChenSammi This PR is adding an API for deletePending directories size 
summary. These all existing APIs /`deletePending` (for pending delete keys), 
`/deletePending/dirs` (for deletePending directories) and 
`/deletePending/dir/summary` are for different purpose respectively. As far as 
I understand, currently `/deletePending/dir/summary` API is not being used in 
Recon UI anywhere and just returning count pre-computed from 
`OmTableInsightTask` and not on the fly. And `/deletePending/dirs` API is 
iterating `deletedDirTable` in same way as this new API 
`/deletePending/dirs/size-summary` in this PR is iterating the table. If you 
see the difference in their code, there is not much difference and rather 
existing API is more sophisticated and supports pagination as well. Existing 
API and new API in this PR both are using the size values (replicated , 
unreplicated) from pre-computed data from NSSummary and will provide similar 
performance and same data. @priyeshkaratha can test and confirm.
  It is just that , If we can handle limit param with -1 (all values),, then no 
need of new API in this PR, because new API in this PR also iterating all keys 
(records) from `deletedDirTable`.



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