sadanand48 commented on code in PR #4226:
URL: https://github.com/apache/ozone/pull/4226#discussion_r1093529231


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java:
##########
@@ -1010,6 +1013,24 @@ listingPageSize, uri, workingDir, getUsername())
     return statusList;
   }
 
+  @Override
+  public FsStatus getStatus(Path p) throws IOException {
+    BasicOzoneClientAdapterImpl adapterImpl =
+        (BasicOzoneClientAdapterImpl) adapter;
+    OzoneBucket bucket = adapterImpl.getBucket();
+    long usedBytes = bucket.getUsedBytes();
+    long quota = Long.MAX_VALUE;
+    if (bucket.getQuotaInBytes() > -1) {
+      quota = bucket.getQuotaInBytes();
+    } else {
+      OzoneVolume volume = adapterImpl.getVolume();
+      if (volume.getQuotaInBytes() > -1) {
+        quota = volume.getQuotaInBytes();

Review Comment:
   Suppose a volume vol1 has 2 buckets buck1 and buck2, if vol1 quota is 1GB 
and buck1 quota is 1GB,  if I am not wrong user won't be able to write to buck2 
as buck1 has reserved all of vol1's space. In that case Total size for buck2= 0 
and not 1GB I guess.
   cc @sumitagrawl 



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