[ 
https://issues.apache.org/jira/browse/HDDS-10634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-10634:
----------------------------------
    Labels: pull-request-available  (was: )

> Recon - listKeys API for listing of OBS , FSO and Legacy bucket keys with 
> filters
> ---------------------------------------------------------------------------------
>
>                 Key: HDDS-10634
>                 URL: https://issues.apache.org/jira/browse/HDDS-10634
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: Ozone Recon
>            Reporter: Devesh Kumar Singh
>            Assignee: Devesh Kumar Singh
>            Priority: Major
>              Labels: pull-request-available
>
> New API:
> api/v1/namespace/listKeys?startPrefix=/volume1/obs-bucket/&count=105
> h5. Default values of API parameters if not provided:
>  # replicationType - RATIS
>  # creationTime - empty string and filter will not be applied, so list out 
> keys irrespective of age.
>  # keySize - 0 bytes, which means all keys greater than zero bytes will be 
> listed, effectively all.
>  # startPrefix - /
>  # count - 1000
>  
> h5. Behavior of API:
> h5.        For OBS bucket - list out *_count_* number of keys on the provided 
> path.
> This API will implement pagination support using *count  params.*
> h3. Get List of All Keys:
>      GET /api/v1/namespace/listKeys
>      API params:
>  # replicationType
>  # creationTime in "MM-dd-yyyy HH:mm:ss" string format.
>  # startPrefix
>  # count
>  # keySize
>      *Input Request:*
>            
> api/v1/namespace/listKeys?startPrefix=/volume1/obs-bucket/&count=105
>      *Output Response:*
>       **      {
>     "status": "OK",
>     "path": "/volume1/obs-bucket/",
>     "size": 62914560,
>     "sizeWithReplica": -1,
>     "subPathCount": 6,
>     "subPaths": [
>        
> {             "key": true,             "path": "key1",             "size": 
> 10485760,             "sizeWithReplica": -1,             "isKey": true,       
>       "replicationType": "RATIS",             "creationTime": "1234567",      
>        "modificationTime": "4567259"         }
> ,
>        
> {             "key": true,             "path": "key1/key2",             
> "size": 10485760,             "sizeWithReplica": -1,             "isKey": 
> true         }
> ,
>        
> {             "key": true,             "path": "key1/key2/key3",             
> "size": 10485760,             "sizeWithReplica": -1,             "isKey": 
> true,             "replicationType": "RATIS",             "creationTime": 
> "1234567",             "modificationTime": "4567259"        }
> ,
>        
> {             "key": true,             "path": "key4",             "size": 
> 10485760,             "sizeWithReplica": -1,             "isKey": true,       
>       "replicationType": "RATIS",             "creationTime": "1234567",      
>        "modificationTime": "4567259"        }
> ,
>        
> {             "key": true,             "path": "key5",             "size": 
> 10485760,             "sizeWithReplica": -1,             "isKey": true,       
>       "replicationType": "RATIS",             "creationTime": "1234567",      
>        "modificationTime": "4567259"        }
> ,
>        
> {             "key": true,             "path": "key6",             "size": 
> 10485760,             "sizeWithReplica": -1,             "isKey": true,       
>       "replicationType": "RATIS",             "creationTime": "1234567",      
>        "modificationTime": "4567259"        }
>     ],
>     "sizeDirectKey": 62914560
> }
>  
>  
> Working of API will be similar to what we have in CLI (ozone sh key list 
> --start=key4 --length=5 /volume1/obs-bucket/).
> This mean, API will apply filters like *{{replicationType}}* , *{{keySize}}*  
> and *{{creationTime}}*  on set of records returned after *{{startPrefix}}* 
> (exclusive) and number of records returned equal to *count* value specified. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to