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


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -364,6 +380,33 @@ private void getPendingForDeletionKeyInfo(
     }
   }
 
+  /** Retrieves the summary of deleted keys.
+   *
+   * This method calculates and returns a summary of deleted keys.
+   *
+   * @return The HTTP  response body includes a map with the following entries:
+   * - "totalDeletedKeys": the total number of deleted keys
+   * - "totalReplicatedDataSize": the total replicated size for deleted keys
+   * - "totalUnreplicatedDataSize": the total unreplicated size for deleted 
keys
+   *
+   *
+   * Example response:
+   *   {
+   *    "totalDeletedKeys": 8,
+   *    "totalReplicatedDataSize": 90000,
+   *    "totalUnreplicatedDataSize": 30000
+   *   }
+   */
+  @GET
+  @Path("/deletePending/summary")
+  public Response getDeletedKeySummary() {
+    // Create a HashMap for the keysSummary
+    Map<String, Long> keysSummary = new HashMap<>();
+    // Create a keys summary for deleted keys
+    createKeysSummaryForDeletedKey(keysSummary);
+    return Response.ok(keysSummary).build();
+  }

Review Comment:
   Same comment, pls update the API doc and remove summary part.



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -255,15 +253,39 @@ public Response getOpenKeyInfo(
         break;
       }
     }
-    // Populate the keysSummary map
-    createKeysSummaryForOpenKey(keysSummary);
-
-    openKeyInsightInfo.setKeysSummary(keysSummary);

Review Comment:
   @ArafatKhan2198 Thanks for working on this patch, If we have removed 
keySummary from this API endpoint, then kindly update API doc as well.



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