smengcl opened a new pull request, #5175:
URL: https://github.com/apache/ozone/pull/5175

   ## What changes were proposed in this pull request?
   
   A snapshot's referenced size is identical to the bucket's point-in-time 
`omBucketInfo.getUsedBytes()`. Note it is the size AFTER replication.
   
   - Snapshot referenced size is stored directly into `SnapshotInfoTable` 
during snapshot creation so as to avoid opening every single snapshot under a 
bucket just to display the size.
   - Currently referenced size can be shown under `fs -ls`:
   
   ```
   bash-4.2$ ozone fs -mkdir -p ofs://om/vol1/buck2/dir3/subdir4/
   bash-4.2$ ozone fs -put README.md ofs://om/vol1/buck2/dir3/subdir4/
   bash-4.2$ ozone fs -createSnapshot ofs://om/vol1/buck2/ snap1
   Created snapshot ofs://om/vol1/buck2/.snapshot/snap1
   bash-4.2$ ozone fs -ls ofs://om/vol1/buck2/.snapshot/
   Found 1 items
   drwxrwxrwx   - hadoop hadoop       4068 2023-08-11 07:30 
ofs://om/vol1/buck2/.snapshot/snap1
   bash-4.2$
   ```
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-9159
   
   ## How was this patch tested?
   
   - Tested manually in Docker compose cluster.
   - Tested via `testFsLsSnapshot`.


-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to