ArafatKhan2198 commented on code in PR #4406:
URL: https://github.com/apache/ozone/pull/4406#discussion_r1141465077
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ClusterStateEndpoint.java:
##########
@@ -127,13 +131,19 @@ public Response getClusterState() {
}
Long totalKeys = 0L;
+ Long deletedKeys = 0L;
+
if (keyRecord != null) {
totalKeys += keyRecord.getValue();
}
if (fileRecord != null) {
totalKeys += fileRecord.getValue();
}
+ if (deletedKeyRecord != null) {
+ deletedKeys += deletedKeyRecord.getValue();
+ }
builder.setKeys(totalKeys);
Review Comment:
> IMO, we should just update Overview page data like number of deleted keys
in case of LEGACY/OBS buckets and number of deleted paths in case of FSO
buckets. Details of those keys can be shown and done in new requirement where I
am working currently on design for OM DB Insights and SCM DB insights page.
Thank you for your suggestion. I agree that it would be beneficial to
distinguish between deleted keys in OBS/Legacy and FSO. However, implementing
this on the ClusterStateEndpoint may not be feasible since we maintain a global
count of the total keys instead of iterating through the entire table.
Nonetheless, we can differentiate between deleted OBS keys and FSO keys by
iterating through the deleted table, which is the only available option.
However, this approach may not be suitable for the ClusterStateEndpoint API.
--
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]