-----------------------------------------------------------
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