-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75208/#review226948
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On Sept. 25, 2024, 8:03 p.m., Radhika Kundam wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75208/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2024, 8:03 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Ramesh Mani.
> 
> 
> Bugs: RANGER-4934
>     https://issues.apache.org/jira/browse/RANGER-4934
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Ranger API to add and delete assets to the DataShare in bulk. Current API 
> accepts only one resource and has to support adding / deleting multiple 
> resources.
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/store/AbstractGdsStore.java
>  4125a85dc 
>   agents-common/src/main/java/org/apache/ranger/plugin/store/GdsStore.java 
> 976fa4989 
>   security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java 
> 4b13cf9d3 
>   security-admin/src/main/java/org/apache/ranger/rest/GdsREST.java b1a00533e 
>   
> security-admin/src/main/java/org/apache/ranger/security/context/RangerAPIList.java
>  65e0f7848 
> 
> 
> Diff: https://reviews.apache.org/r/75208/diff/3/
> 
> 
> Testing
> -------
> 
> Tested manually.
> CURL cmd to add resources in bulk:
> ----------------------------------
> curl --location '<ranger url>/service/gds/resources' \
> --data '[
>     {
>         "createdBy": "Admin",
>         "isEnabled": "true",
>         "version": 1,
>         "dataShareId":"1",
>         "resource":{
>             "database":{
>                 "values":["test_db"]
>             },
>             "table":{
>                 "values":["sal1","sal2","sal4"]
>             },
>             "column": {
>                 "values": [
>                     "id"
>                 ],
>                 "isExcludes": false,
>                 "isRecursive": false
>             }
>         },
>         "name":"test-resource-17",
>         "accessTypes":["all"]
>     },
>     {
>         "createdBy": "Admin",
>         "isEnabled": "true",
>         "version": 1,
>         "dataShareId":"1",
>         "resource":{
>             "database":{
>                 "values":["default"]
>             },
>             "table":{
>                 "values":["sal2","emp","tb_1","sal1","sal3","tb_2"]
>             },
>             "column": {
>                 "values": [
>                     "*"
>                 ],
>                 "isExcludes": false,
>                 "isRecursive": false
>             }
>         },
>         "name":"test-resource-18",
>         "accessTypes":["all"]
>     }
> ]'
> 
> CURL cmd to remove resources in bulk:
> -------------------------------------
> curl --location --request DELETE '<ranger url>/service/gds/resources' \
> --data '[2,3,4,7]'
> 
> By default max batch size is 100 and it can be configured using configration 
> "ranger.admin.rest.gds.shared.resources.max.batch.size". If requested batch 
> size exceeds this limit, it'll throw error 
> "addSharedResources/removeSharedResources batch size exceeded the configured 
> limit: Maximum allowed is <configured value>
> 
> 
> File Attachments
> ----------------
> 
> API details
>   
> https://reviews.apache.org/media/uploaded/files/2024/09/16/a4540abb-1c2d-471e-bbd3-eb74a8756159__Multiple_resources_add_delete_API_details.json
> 
> 
> Thanks,
> 
> Radhika Kundam
> 
>

Reply via email to