You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Kishor Gollapalliwar <ki...@gmail.com> on 2022/06/01 15:15:35 UTC

Review Request 74006: RANGER-3740: Create Ranger Admin API to refresh tag cache -- follow-up patch

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

Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Vishal Suvagia, and Velmurugan Periasamy.


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


Repository: ranger


Description
-------

Create Ranger Admin API to refresh tag cache, which will help refreshing cache externally.

Problem: In the current API, if a user accidently do not pass service_name, it resets everything.

Changes: 
1. Updated existing API: enforcing service_name as mandatory parameter
2. Created new API: reset/ remove everything (all service policy cache)


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/rest/TagREST.java 79dbdc76d 


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


Testing
-------

1. mvn clean compile package install -U
2. Hit API without service name (http://localhost:6080/service/tags/tags/cache/reset)
3. Hit API with empty service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=)
4. Hit API with invalid service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=invalid_service)
5. Hit API with valid service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=test_hdfs)
6. Hit API with valid service name when cache is empty (http://localhost:6080/service/tags/tags/cache/reset?serviceName=test_hdfs)
7. Hit API when cache is not empty (http://localhost:6080/service/tags/tags/cache/reset-all)
8. Hit API when cache is empty (http://localhost:6080/service/tags/tags/cache/reset-all)


Thanks,

Kishor Gollapalliwar


Re: Review Request 74006: RANGER-3740: Create Ranger Admin API to refresh tag cache -- follow-up patch

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74006/#review224473
-----------------------------------------------------------


Ship it!




Ship It!

- Abhay Kulkarni


On June 1, 2022, 3:15 p.m., Kishor Gollapalliwar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74006/
> -----------------------------------------------------------
> 
> (Updated June 1, 2022, 3:15 p.m.)
> 
> 
> Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Vishal Suvagia, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3740
>     https://issues.apache.org/jira/browse/RANGER-3740
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Create Ranger Admin API to refresh tag cache, which will help refreshing cache externally.
> 
> Problem: In the current API, if a user accidently do not pass service_name, it resets everything.
> 
> Changes: 
> 1. Updated existing API: enforcing service_name as mandatory parameter
> 2. Created new API: reset/ remove everything (all service policy cache)
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/TagREST.java 79dbdc76d 
> 
> 
> Diff: https://reviews.apache.org/r/74006/diff/1/
> 
> 
> Testing
> -------
> 
> 1. mvn clean compile package install -U
> 2. Hit API without service name (http://localhost:6080/service/tags/tags/cache/reset)
> 3. Hit API with empty service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=)
> 4. Hit API with invalid service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=invalid_service)
> 5. Hit API with valid service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=test_hdfs)
> 6. Hit API with valid service name when cache is empty (http://localhost:6080/service/tags/tags/cache/reset?serviceName=test_hdfs)
> 7. Hit API when cache is not empty (http://localhost:6080/service/tags/tags/cache/reset-all)
> 8. Hit API when cache is empty (http://localhost:6080/service/tags/tags/cache/reset-all)
> 
> 
> Thanks,
> 
> Kishor Gollapalliwar
> 
>


Re: Review Request 74006: RANGER-3740: Create Ranger Admin API to refresh tag cache -- follow-up patch

Posted by Mehul Parikh <xs...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74006/#review224486
-----------------------------------------------------------


Ship it!




Ship It!

- Mehul Parikh


On June 1, 2022, 3:15 p.m., Kishor Gollapalliwar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74006/
> -----------------------------------------------------------
> 
> (Updated June 1, 2022, 3:15 p.m.)
> 
> 
> Review request for ranger, Dhaval Shah, Dineshkumar Yadav, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Vishal Suvagia, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3740
>     https://issues.apache.org/jira/browse/RANGER-3740
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Create Ranger Admin API to refresh tag cache, which will help refreshing cache externally.
> 
> Problem: In the current API, if a user accidently do not pass service_name, it resets everything.
> 
> Changes: 
> 1. Updated existing API: enforcing service_name as mandatory parameter
> 2. Created new API: reset/ remove everything (all service policy cache)
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/TagREST.java 79dbdc76d 
> 
> 
> Diff: https://reviews.apache.org/r/74006/diff/1/
> 
> 
> Testing
> -------
> 
> 1. mvn clean compile package install -U
> 2. Hit API without service name (http://localhost:6080/service/tags/tags/cache/reset)
> 3. Hit API with empty service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=)
> 4. Hit API with invalid service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=invalid_service)
> 5. Hit API with valid service name (http://localhost:6080/service/tags/tags/cache/reset?serviceName=test_hdfs)
> 6. Hit API with valid service name when cache is empty (http://localhost:6080/service/tags/tags/cache/reset?serviceName=test_hdfs)
> 7. Hit API when cache is not empty (http://localhost:6080/service/tags/tags/cache/reset-all)
> 8. Hit API when cache is empty (http://localhost:6080/service/tags/tags/cache/reset-all)
> 
> 
> Thanks,
> 
> Kishor Gollapalliwar
> 
>