You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Abhishek Pal (Jira)" <ji...@apache.org> on 2025/01/06 08:17:00 UTC
[jira] [Comment Edited] (HDDS-11987) Recon UI - Disk Usage : Quota Allowed and Quota In Bytes are same and duplicate
[ https://issues.apache.org/jira/browse/HDDS-11987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17910028#comment-17910028 ]
Abhishek Pal edited comment on HDDS-11987 at 1/6/25 8:16 AM:
-------------------------------------------------------------
Hi [~deveshsingh], for this from the backend I can see that the quota allowed and quota in bytes are being calculated differently.
For example in case of volume:
- Quota allowed is calculated [here|https://github.com/apache/ozone/blob/8f2689dfe5f9b79e64f7d78acbaaf300c1ccbd1c/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/VolumeEntityHandler.java#L159]
- Quota in Bytes is coming from *ObjectDBInfo* class where it is set as metadata and retrieved [here|https://github.com/apache/ozone/blob/8f2689dfe5f9b79e64f7d78acbaaf300c1ccbd1c/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/VolumeEntityHandler.java#L159]
- Quota Used in Bytes is calculated [here|https://github.com/apache/ozone/blob/8f2689dfe5f9b79e64f7d78acbaaf300c1ccbd1c/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/VolumeEntityHandler.java#L165] by iterating over the buckets and adding their sizes.
As far as I understand, quota in bytes is the base size and quota used adds on that the extra child usages to calculate final usage.
So I have two questions:
- Will there be any case where this might be different i.e *Quota Allowed* and *Quota in Bytes*?
- And in case it is the same, we can refactor the backend code to remove this calculation from the response itself right?
was (Author: JIRAUSER291782):
Hi [~deveshsingh], for this from the backend I can see that the quota allowed and quota in bytes are being calculated differently.
For example in case of volume:
Quota allowed is calculated [here|https://github.com/apache/ozone/blob/8f2689dfe5f9b79e64f7d78acbaaf300c1ccbd1c/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/VolumeEntityHandler.java#L159]
Quota Used in Bytes is calculated [here|https://github.com/apache/ozone/blob/8f2689dfe5f9b79e64f7d78acbaaf300c1ccbd1c/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/VolumeEntityHandler.java#L165] by iterating over the buckets and adding their sizes.
So I have two questions:
- Will there be any case where this might be different?
- And in case it is the same, we can refactor the backend code to remove this calculation from the response itself right?
> Recon UI - Disk Usage : Quota Allowed and Quota In Bytes are same and duplicate
> -------------------------------------------------------------------------------
>
> Key: HDDS-11987
> URL: https://issues.apache.org/jira/browse/HDDS-11987
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Devesh Kumar Singh
> Assignee: Abhishek Pal
> Priority: Major
> Attachments: image-2024-12-24-10-07-33-326.png, image-2024-12-24-10-07-49-513.png
>
>
> Disk Usage : Quota Allowed and Quota In Bytes both are same and duplicate, Need to show Quota Allowed:
> !image-2024-12-24-10-07-33-326.png|width=281,height=386!
> !image-2024-12-24-10-07-49-513.png|width=356,height=497!
>
> cc: [~kkasawa]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org