sadanand48 commented on code in PR #4226:
URL: https://github.com/apache/ozone/pull/4226#discussion_r1094343966
##########
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:
Yes, I think total available size for a given bucket on which there is no
quota set =
**volumequota - ( for each bucket in volume : { sum of bucketquota if
enabled else usedbytes})**
although I don't think that there is an api for this in OM ( to get
available size for a 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]