yuangu002 opened a new pull request #2565:
URL: https://github.com/apache/ozone/pull/2565
## What changes were proposed in this pull request?
Add the ozone admin shell command ozone admin namespace summary
From the design doc:
$ ozone admin namespace summary --all /vol1/bucket1/MyDir
Entity Type : Directory
Directories : 1
Keys : 10
DU
Size DiskUsage Path
21G 63G /volume1/bucket1
5G 15G /volume1/bucket2
File Size Distribution
1KB - 2KB - 50% (5)
2KB - 4KB - 50% (5)
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5368
## How was this patch tested?
Configs:
```
ozone sh volume create /vol1
ozone sh volume create /vol2
ozone sh bucket create /vol1/bucket11
ozone sh bucket create /vol1/bucket12
ozone sh bucket create /vol2/bucket21
ozone sh bucket create /vol2/bucket22
ozone sh key put --replication=THREE /vol1/bucket11/key1 README.md
ozone sh key put --replication=THREE /vol1/bucket11/key2s README.md
ozone sh key put --replication=THREE /vol1/bucket11/dir1/key3 README.md
ozone sh key put /vol2/bucket21/key4 CONTRIBUTING.md
ozone sh key put /vol2/bucket21/key5 CONTRIBUTING.md
ozone sh key put /vol2/bucket22/key6 README.md
ozone sh key put --replication=THREE /vol2/bucket22/dir22/key7 LICENSE.txt
ozone sh key put /vol1/bucket12/dir1-1/key8 README.md
ozone sh key put /vol1/bucket12/dir1-2/key9 CONTRIBUTING.md
ozone sh key put --replication=THREE /vol1/bucket12/directKey README.md
```
Usage:
`ozone admin namespace [summary | du | quota | dist] [-options] <path>`
Example: `ozone admin namespace summary /`

(du with replica)
`ozone admin namespace du --replica /`

(du with listing direct keys)
ozone admin namespace du --replica --file /vol1/bucket12

Other option usage for `du`:

`ozone admin namespace quota /`

`ozone admin namespace dist /`

cc @smengcl @avijayanhwx for reviews.
--
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]