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 2024/10/22 23:11:58 UTC
Re: Review Request 75227: RANGER-4967: Refactor RangerTagEnricher class for reusability
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75227/
-----------------------------------------------------------
(Updated Oct. 22, 2024, 11:11 p.m.)
Review request for ranger, madhan, Madhan Neethiraj, and Velmurugan Periasamy.
Changes
-------
Added JIRA details
Summary (updated)
-----------------
RANGER-4967: Refactor RangerTagEnricher class for reusability
Bugs: RANGER-4967
https://issues.apache.org/jira/browse/RANGER-4967
Repository: ranger
Description
-------
RangerTagEnricher is optimized to search Trie objects for reduced scope. This functionality should be usable by other modules that may need to deal with the scale/performance issues similar to ones encountered when searching large number of tags.
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java 92d2a7848
agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java PRE-CREATION
Diff: https://reviews.apache.org/r/75227/diff/3/
Changes: https://reviews.apache.org/r/75227/diff/2-3/
Testing
-------
Passed all unit tests cleanly.
Thanks,
Abhay Kulkarni
Re: Review Request 75227: RANGER-4967: Refactor RangerTagEnricher class for reusability
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
> On Oct. 23, 2024, midnight, Madhan Neethiraj wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java
> > Line 95 (original), 95 (patched)
> > <https://reviews.apache.org/r/75227/diff/2-3/?file=2293869#file2293869line95>
> >
> > To avoid potential NPE, consider replacing:
> >
> > request.getResourceMatchingScope().equals(RangerAccessRequest.ResourceMatchingScope.SELF_OR_DESCENDANTS))
> >
> > with:
> >
> > RangerAccessRequest.ResourceMatchingScope.SELF_OR_DESCENDANTS.equals(request.getResourceMatchingScope())
This should not an issue as the request's (specifically RangerAccessRequestImpl object's) resourceMatchingScope member variable is always null - default value is RangerAccessRequest.ResourceMatchingScope.SELF. In any case, this comment is addressed now.
- Abhay
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75227/#review226991
-----------------------------------------------------------
On Oct. 23, 2024, 5:43 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75227/
> -----------------------------------------------------------
>
> (Updated Oct. 23, 2024, 5:43 p.m.)
>
>
> Review request for ranger, madhan, Madhan Neethiraj, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-4967
> https://issues.apache.org/jira/browse/RANGER-4967
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RangerTagEnricher is optimized to search Trie objects for reduced scope. This functionality should be usable by other modules that may need to deal with the scale/performance issues similar to ones encountered when searching large number of tags.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java 63ed47ded
> agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/75227/diff/4/
>
>
> Testing
> -------
>
> Passed all unit tests cleanly.
>
>
> Thanks,
>
> Abhay Kulkarni
>
>
Re: Review Request 75227: RANGER-4967: Refactor RangerTagEnricher class for reusability
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75227/#review226991
-----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java
Line 95 (original), 95 (patched)
<https://reviews.apache.org/r/75227/#comment315272>
To avoid potential NPE, consider replacing:
request.getResourceMatchingScope().equals(RangerAccessRequest.ResourceMatchingScope.SELF_OR_DESCENDANTS))
with:
RangerAccessRequest.ResourceMatchingScope.SELF_OR_DESCENDANTS.equals(request.getResourceMatchingScope())
- Madhan Neethiraj
On Oct. 22, 2024, 11:11 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75227/
> -----------------------------------------------------------
>
> (Updated Oct. 22, 2024, 11:11 p.m.)
>
>
> Review request for ranger, madhan, Madhan Neethiraj, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-4967
> https://issues.apache.org/jira/browse/RANGER-4967
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RangerTagEnricher is optimized to search Trie objects for reduced scope. This functionality should be usable by other modules that may need to deal with the scale/performance issues similar to ones encountered when searching large number of tags.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java 92d2a7848
> agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/75227/diff/3/
>
>
> Testing
> -------
>
> Passed all unit tests cleanly.
>
>
> Thanks,
>
> Abhay Kulkarni
>
>
Re: Review Request 75227: RANGER-4967: Refactor RangerTagEnricher class for reusability
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75227/#review226996
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On Oct. 23, 2024, 5:43 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75227/
> -----------------------------------------------------------
>
> (Updated Oct. 23, 2024, 5:43 p.m.)
>
>
> Review request for ranger, madhan, Madhan Neethiraj, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-4967
> https://issues.apache.org/jira/browse/RANGER-4967
>
>
> Repository: ranger
>
>
> Description
> -------
>
> RangerTagEnricher is optimized to search Trie objects for reduced scope. This functionality should be usable by other modules that may need to deal with the scale/performance issues similar to ones encountered when searching large number of tags.
>
>
> Diffs
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java 63ed47ded
> agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/75227/diff/4/
>
>
> Testing
> -------
>
> Passed all unit tests cleanly.
>
>
> Thanks,
>
> Abhay Kulkarni
>
>
Re: Review Request 75227: RANGER-4967: Refactor RangerTagEnricher class for reusability
Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75227/
-----------------------------------------------------------
(Updated Oct. 23, 2024, 5:43 p.m.)
Review request for ranger, madhan, Madhan Neethiraj, and Velmurugan Periasamy.
Changes
-------
Addressed review comment
Bugs: RANGER-4967
https://issues.apache.org/jira/browse/RANGER-4967
Repository: ranger
Description
-------
RangerTagEnricher is optimized to search Trie objects for reduced scope. This functionality should be usable by other modules that may need to deal with the scale/performance issues similar to ones encountered when searching large number of tags.
Diffs (updated)
-----
agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java 63ed47ded
agents-common/src/main/java/org/apache/ranger/plugin/util/CachedResourceEvaluators.java PRE-CREATION
Diff: https://reviews.apache.org/r/75227/diff/4/
Changes: https://reviews.apache.org/r/75227/diff/3-4/
Testing
-------
Passed all unit tests cleanly.
Thanks,
Abhay Kulkarni