DaveTeng0 commented on code in PR #3970:
URL: https://github.com/apache/ozone/pull/3970#discussion_r1024507148
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/BucketEntityHandler.java:
##########
@@ -126,15 +125,17 @@ public DUResponse getDuResponse(
public QuotaUsageResponse getQuotaResponse()
throws IOException {
QuotaUsageResponse quotaUsageResponse = new QuotaUsageResponse();
- String[] names = getNames();
- String bucketKey = getOmMetadataManager().getBucketKey(names[0], names[1]);
- OmBucketInfo bucketInfo = getOmMetadataManager()
- .getBucketTable().getSkipCache(bucketKey);
- long bucketObjectId = bucketInfo.getObjectID();
- long quotaInBytes = bucketInfo.getQuotaInBytes();
- long quotaUsedInBytes = getTotalSize(bucketObjectId);
- quotaUsageResponse.setQuota(quotaInBytes);
- quotaUsageResponse.setQuotaUsed(quotaUsedInBytes);
+ RootEntityHandler rootEntityHandler = new RootEntityHandler(
+ getReconNamespaceSummaryManager(),
+ getOmMetadataManager(),
+ getReconSCM(),
+ "/"
+ );
+ QuotaUsageResponse rootQuotaUsageResponse =
Review Comment:
in HDFS, -df returns capacity of the whole file system when df towards a
directory, which we'll do similar here in Ozone for bucket.
--
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]