sumitagrawl commented on code in PR #4226:
URL: https://github.com/apache/ozone/pull/4226#discussion_r1105699664
##########
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:
@mohan3d IMO volume.getUsedBytes() handling is not required as this is
performance extensive operation where it will access all buckets in volume
which is I/O. And documents / design enforces the restriction only for
performance purpose.
Additionally, quota feature was not stable earlier, so handling is not
required.
--
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]