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


##########
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:
   Thanks for the comment @devmadhuu 
   I have made the changes!



##########
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:
   Done!



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