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

(Updated Jan. 25, 2023, 2:49 p.m.)


Review request for ranger, Don Bosco Durai, Kirby Zhou, Abhay Kulkarni, Madhan 
Neethiraj, Mehul Parikh, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan 
Neethiraj, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy.


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


Repository: ranger


Description
-------

getPolicyByName searches policy by serviceName, policyName simply by traverse 
all policies in RangerServicePoliciesCache. 

However, It takes more time to search for policies from the cache when there 
are millions of policies

As well as The above REST API sometimes gives stable data due to the deleted 
element is present in the Cache 

We need to call the DB to fetch policy instead of calling 
RangerServicePoliciesCache

In PublicAPIsv2 we add the API's which are available in ServiceREST as an API 
and the getPolicyByName is not available as an API in ServiceREST.

getPolicyByName ---> (/api/service/{servicename}/policy/{policyname}) in 
PublicAPIsv2

I guess we should add the below  API in ServiceREST also for the same.

getPolicyByName ---> (/policies/service/{serviceName}/policy/{policyName}) in 
ServiceREST


Diffs (updated)
-----

  intg/src/main/java/org/apache/ranger/RangerClient.java e4e3a57ad 
  
ranger-examples/sample-client/src/main/java/org/apache/ranger/examples/sampleclient/SampleClient.java
 d0202e47e 
  security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java 
d98910bee 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
ec02f47f7 
  security-admin/src/test/java/org/apache/ranger/rest/TestPublicAPIsv2.java 
7409883ab 
  security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java 
8fdcc43c8 


Diff: https://reviews.apache.org/r/74251/diff/5/

Changes: https://reviews.apache.org/r/74251/diff/4-5/


Testing
-------


Thanks,

Ramachandran Krishnan

Reply via email to