You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Abhay Kulkarni <ak...@hortonworks.com> on 2017/07/28 00:48:24 UTC

Review Request 61199: Disable dynamic sorting of policies when trie pre-filter is enabled

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

Review request for ranger and Madhan Neethiraj.


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


Repository: ranger


Description
-------

With the introduction of trie pre-filter, dynamic sorting of policies for evaluation (based on usage count) wouldn't help much - since the number of policies to evaluate will be much smaller after trie pre-filter. In fact, dynamic sorting might add unnecessary overheads - in periodically scanning through the trie and creating sorted lists for each node. It will be better to turn-off this dynamic sorting when trie-prefilter is enabled.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyRepository.java 1ce2386 
  agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java 191ad98 
  agents-common/src/main/java/org/apache/ranger/plugin/util/RangerResourceTrie.java c22ecde 


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


Testing
-------

Tested in a local VM


Thanks,

Abhay Kulkarni


Re: Review Request 61199: Disable dynamic sorting of policies when trie pre-filter is enabled

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61199/#review181711
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On July 28, 2017, 6:31 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61199/
> -----------------------------------------------------------
> 
> (Updated July 28, 2017, 6:31 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-1714
>     https://issues.apache.org/jira/browse/RANGER-1714
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> With the introduction of trie pre-filter, dynamic sorting of policies for evaluation (based on usage count) wouldn't help much - since the number of policies to evaluate will be much smaller after trie pre-filter. In fact, dynamic sorting might add unnecessary overheads - in periodically scanning through the trie and creating sorted lists for each node. It will be better to turn-off this dynamic sorting when trie-prefilter is enabled.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerServiceResourceMatcher.java ecddf75 
>   agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyRepository.java 1ce2386 
>   agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java 191ad98 
>   agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerPolicyResourceEvaluator.java 181863c 
>   agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java d5aa1ae 
>   agents-common/src/main/java/org/apache/ranger/plugin/util/RangerResourceTrie.java c22ecde 
> 
> 
> Diff: https://reviews.apache.org/r/61199/diff/2/
> 
> 
> Testing
> -------
> 
> Tested in a local VM
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 61199: Disable dynamic sorting of policies when trie pre-filter is enabled

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

(Updated July 28, 2017, 9:07 p.m.)


Review request for ranger and Madhan Neethiraj.


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


Repository: ranger


Description
-------

With the introduction of trie pre-filter, dynamic sorting of policies for evaluation (based on usage count) wouldn't help much - since the number of policies to evaluate will be much smaller after trie pre-filter. In fact, dynamic sorting might add unnecessary overheads - in periodically scanning through the trie and creating sorted lists for each node. It will be better to turn-off this dynamic sorting when trie-prefilter is enabled.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerServiceResourceMatcher.java ecddf75 
  agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyRepository.java 1ce2386 
  agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java 191ad98 
  agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerPolicyResourceEvaluator.java 181863c 
  agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java d5aa1ae 
  agents-common/src/main/java/org/apache/ranger/plugin/util/RangerResourceTrie.java c22ecde 


Diff: https://reviews.apache.org/r/61199/diff/3/

Changes: https://reviews.apache.org/r/61199/diff/2-3/


Testing
-------

Tested in a local VM


Thanks,

Abhay Kulkarni


Re: Review Request 61199: Disable dynamic sorting of policies when trie pre-filter is enabled

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

(Updated July 28, 2017, 6:31 p.m.)


Review request for ranger and Madhan Neethiraj.


Changes
-------

Code clean up


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


Repository: ranger


Description
-------

With the introduction of trie pre-filter, dynamic sorting of policies for evaluation (based on usage count) wouldn't help much - since the number of policies to evaluate will be much smaller after trie pre-filter. In fact, dynamic sorting might add unnecessary overheads - in periodically scanning through the trie and creating sorted lists for each node. It will be better to turn-off this dynamic sorting when trie-prefilter is enabled.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerServiceResourceMatcher.java ecddf75 
  agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyRepository.java 1ce2386 
  agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerPolicyEvaluator.java 191ad98 
  agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerPolicyResourceEvaluator.java 181863c 
  agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java d5aa1ae 
  agents-common/src/main/java/org/apache/ranger/plugin/util/RangerResourceTrie.java c22ecde 


Diff: https://reviews.apache.org/r/61199/diff/2/

Changes: https://reviews.apache.org/r/61199/diff/1-2/


Testing
-------

Tested in a local VM


Thanks,

Abhay Kulkarni