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

Review request for ranger, Anand Nadar, Ankita Sinha, Madhan Neethiraj, Monika 
Kachhadiya, and Prashant Satam.


Bugs: https://issues.apache.org/jira/browse/RANGER-4413
    
https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/RANGER-4413


Repository: ranger


Description
-------

In Ranger, we have pagination parameters (pageSize and startIndex) to get 
paginated records, which build queries and get records from DB accordingly. For 
GDS APIs, this will not work in we have to do ACL evaluation on the records 
from DB. Pagination for GDS APIs needs to be done in Java.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java 55c8495e4 


Diff: https://reviews.apache.org/r/74604/diff/1/


Testing
-------

Validated pagination for GET Dataset API for which ACL evaluation is in place - 
/service/gds/dataset:
API: 
http://localhost:6080/service/gds/dataset?gdsPermission=LIST&pageSize=5&startIndex=10
Response:
{
    "startIndex": 10,
    "pageSize": 5,
    "totalCount": 12,
    "resultSize": 2,
    "sortType": "datasetId",
    "sortBy": "asc",
    "list": [
        {
            "id": 11,
            "guid": "c902ce32-9bed-4422-a43b-4a4c478f5515",
            "isEnabled": true,
            "createdBy": "Admin",
            "updatedBy": "Admin",
            "createTime": 1694710751099,
            "updateTime": 1694710751100,
            "version": 1,
            "description": "This is GDS description",
            "name": "Dataset95",
            "termsOfUse": "Gds Terms of Use"
        },
        {
            "id": 12,
            "guid": "8fa813d0-9dd4-44cf-b283-4c50fcb28839",
            "isEnabled": true,
            "createdBy": "Admin",
            "updatedBy": "Admin",
            "createTime": 1694710756341,
            "updateTime": 1694710756342,
            "version": 1,
            "description": "This is GDS description",
            "name": "Dataset96",
            "termsOfUse": "Gds Terms of Use"
        }
    ],
    "listSize": 2
}


Thanks,

Subhrat Chaudhary

Reply via email to