You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Mahesh Bandal <ma...@gmail.com> on 2021/07/07 13:56:57 UTC
Re: Review Request 72949: RANGER-3024: Improve response time and
refactor code for GET API /service/xusers/lookup/users
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72949/
-----------------------------------------------------------
(Updated July 7, 2021, 1:56 p.m.)
Review request for ranger, Ankita Sinha, Dhaval Shah, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
Bugs: RANGER-3024
https://issues.apache.org/jira/browse/RANGER-3024
Repository: ranger
Description
-------
GET API /service/xusers/lookup/users returns List of String object which contains username. But it also traverse through groupUser list while populating view object VXUser. When there are large number of users and group_users data in database; it takes longer time to respond if we set request parameter pageSize=1000 or more. This causes performance issue.
So created a new method lookupXUsers which will search for users based on searchCriteria and map user entity to view object. It will not traverse through groupUsers.
Diffs (updated)
-----
security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java 624232644
security-admin/src/main/java/org/apache/ranger/rest/XUserREST.java 739809c0d
security-admin/src/main/java/org/apache/ranger/service/XUserService.java 856690534
Diff: https://reviews.apache.org/r/72949/diff/2/
Changes: https://reviews.apache.org/r/72949/diff/1-2/
Testing
-------
GET request for /service/xusers/lookup/users API returns response instantaneously even with request parameter pageSize=50000.
Tested with following stats :
select count(*) from x_user;
50052
select count(*) from x_group_users;
500056
Thanks,
Mahesh Bandal