-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74568/
-----------------------------------------------------------
(Updated Sept. 8, 2023, 9:54 a.m.)
Review request for ranger, Abhishek Kumar, bhavik patel, Dhaval Shah,
Dineshkumar Yadav, Kishor Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj,
Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
Changes
-------
Addressed review comments
Bugs: RANGER-4382
https://issues.apache.org/jira/browse/RANGER-4382
Repository: ranger
Description
-------
**Problem Statement:** Ranger export CSV rest API taking more than 4 hours to
complete the request for just 60k policies
**Proposed solution:** Ranger exportCSV REST endpoint returns RangerPolicies
along with Policy's service type, to populate service types additional DB call
to x_service and x_service_def table is made, though its possible that
initially fetched RangerPolicy objects may already have serviceType which can
be utilized if its available rather making the db call directly.
Diffs (updated)
-----
security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java
036dbfec6
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
86959423c
Diff: https://reviews.apache.org/r/74568/diff/3/
Changes: https://reviews.apache.org/r/74568/diff/2-3/
Testing
-------
Curl request without patch with 64k policies took 4 hours:
curl -ivk -u admin:Admin123 -o /tmp/exportcsv.csv -X GET
'http://localhost:6180/service/plugins/policies/csv'
Built ranger with attached patch and reinstalled using previous DB settings :
Curl request with the proposed patch with 64k policies took 15 seconds in the
first attempt and 10 seconds in the second attempt.
curl -ivk -u admin:Admin123 -o /tmp/exportcsv.csv -X GET
'http://localhost:6180/service/plugins/policies/csv'
Thanks,
Pradeep Agrawal