You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "devmadhuu (via GitHub)" <gi...@apache.org> on 2023/07/10 06:26:14 UTC
[GitHub] [ozone] devmadhuu commented on a diff in pull request #5023: HDDS-8964. Create a separate endpoint for summary for various SCM Insights and OM Insights.
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org