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

   Understand the age of data ( age of buckets, age of objects, age of  
volumes) 
     1. This requirement will be limited by the number of buckets (say top 10) 
to show with their age information as a given volume can have a large number of 
buckets. Same holds true for showing a limited number of volumes (say top 10) 
with their age information if root path  is given. 
     2. Top 10 criteria can be determined based on following factors:
     3. Age of Top 10 buckets can be listed based on either count of keys or 
size of buckets, if path is upto a specific volume.
     4. Age of top 10 volumes can be listed based on either count of buckets or 
size of volumes if path is given as root .
     5. If the path given by the user is upto bucket level,  then top 10 keys 
based on size will be given with their age details.
     6. If the path given by the user is upto key or leaf level, then only that 
key age details will be returned along with size.
   
   https://issues.apache.org/jira/browse/HDDS-7650
   
   ## How was this patch tested?
   
   This patch is tested using postman by verifying backend responses:
   API details:
   If Path is Bucket:
   
   Keys
   TopN Keys with Age, Size details
   By Count - Give user option to select 10, 20, 30 etc
   By Size - Give user option to select With or Without Replica
   Dirs
   TopN Dirs with Age, Size, dirCount, keycount details
   By Count - Give user option to select 10, 20, 30 etc
   By Size - Give user option to select With or Without Replica
   
   If Path is Volume:
   
   Buckets
   TopN Buckets with Age, Size, dirCount, keycount details
   By Count - Give user option to select 10, 20, 30 etc
   By Size - Give user option to select With or Without Replica
   
   If Path is Directory:
   
   Keys
   TopN Keys with Age, Size details
   By Count - Give user option to select 10, 20, 30 etc
   By Size - Give user option to select With or Without Replica
   Dirs
   TopN Dirs with Age, Size, dirCount, keycount details
   By Count - Give user option to select 10, 20, 30 etc
   By Size - Give user option to select With or Without Replica
   
   If Path is Key:
   
   Display: Size, Age details
   
   API End Point :
   Request Type: GET
   API Path: /api/v1/namespace/entitymetrics?path=<path of 
volume/bucket/dir/key>
   Sample Response:
   {
   "entityInfo":
   
   { "type": "DIRECTORY", "numVolume": -1, "numBucket": -1, "numDir": 2, 
"numKey": 5, "status": "OK" }
   
   ,
   "childEntityMetrics": [
   
   { "key": false, "path": "/volume1/bucket1/dir1/dir2", "size": 86060, 
"sizeWithReplica": 258180, "isKey": false, "keyCount": 4, "bucketCount": -1, 
"dirCount": 1, "volumeCount": -1, "type": "DIRECTORY", "creationTime": 
1671801625290, "modificationTime": 1671801625290 }
   
   ,
   
   { "key": true, "path": "/volume1/bucket1/dir1/LICENSE.txt", "size": 21515, 
"sizeWithReplica": 64545, "isKey": true, "keyCount": 0, "bucketCount": -1, 
"dirCount": -1, "volumeCount": -1, "type": "KEY", "creationTime": 
1671801625290, "modificationTime": 1671801625290 }
   
   ],
   "status": "OK"
   }
   


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