DaveTeng0 commented on code in PR #3970:
URL: https://github.com/apache/ozone/pull/3970#discussion_r1024506617


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/handlers/VolumeEntityHandler.java:
##########
@@ -117,21 +116,17 @@ public DUResponse getDuResponse(
   public QuotaUsageResponse getQuotaResponse()
           throws IOException {
     QuotaUsageResponse quotaUsageResponse = new QuotaUsageResponse();
-    String[] names = getNames();
-    List<OmBucketInfo> buckets = listBucketsUnderVolume(names[0]);
-    String volKey = getOmMetadataManager().getVolumeKey(names[0]);
-    OmVolumeArgs volumeArgs =
-            getOmMetadataManager().getVolumeTable().getSkipCache(volKey);
-    long quotaInBytes = volumeArgs.getQuotaInBytes();
-    long quotaUsedInBytes = 0L;
+    RootEntityHandler rootEntityHandler = new RootEntityHandler(
+        getReconNamespaceSummaryManager(),
+        getOmMetadataManager(),
+        getReconSCM(),
+        "/"
+    );
+    QuotaUsageResponse rootQuotaUsageResponse = 
+        rootEntityHandler.getQuotaResponse();

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



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