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

(Updated Aug. 14, 2024, 6:16 p.m.)


Review request for ranger, Kishor Gollapalliwar, madhan, Madhan Neethiraj, 
Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, Velmurugan Periasamy, and 
Vyom Tiwari.


Changes
-------

Added details of the Apache JIRA


Summary (updated)
-----------------

RANGER-4905: Reduce memory needed to create Ranger policy engine


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


Repository: ranger


Description (updated)
-------

Ranger policy engine creates a RangerPolicyResourceMatcher object for every 
resource specified either in policy or in a tag association. 
PolicyResourceMatcher, for the services that have more than one level in their 
resource hierarchy, consists of RangerResourceMatcher objects for each level in 
the resource-level hierarchy for the resource. In many cases, this leads to 
creation of multiple RangerResourceMatchers with identical resource 
specification.

This Jira avoids creation of multiple RangerResourceMatcher objects by 
maintaining a cache of them in the RangerPluginContext object associated with 
the Ranger policy engine, thereby reducing policy engine's memory needs.


Diffs
-----

  
agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java
 2fa24eba6 
  
agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerSecurityZoneValidator.java
 360426198 
  
agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerZoneResourceMatcher.java
 bf4247660 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/PolicyEngine.java
 704434b8e 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPluginContext.java
 5f086ed49 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineOptions.java
 f881eaa14 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerSecurityZoneMatcher.java
 822bb3902 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/gds/GdsDataShareEvaluator.java
 1c608aa3b 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/gds/GdsPolicyEngine.java
 53843136c 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/gds/GdsSharedResourceEvaluator.java
 9785d4b25 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerAbstractPolicyEvaluator.java
 07fe6a38d 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerDefaultPolicyResourceMatcher.java
 f16157ce6 
  
agents-common/src/main/java/org/apache/ranger/plugin/policyresourcematcher/RangerPolicyResourceMatcher.java
 e1cd89b70 
  ranger-tools/src/main/java/org/apache/ranger/sizing/RangerMemSizing.java 
e4ff6eeca 


Diff: https://reviews.apache.org/r/75164/diff/6/


Testing (updated)
-------

Compiled and ran all unit test case successfully.

Tested using dockerized Ranger.

Ran ranger-mem-sizing tool with a large number of tags for Ozone service, and 
noticed about 32% less memory used by the policy engine.


Thanks,

Abhay Kulkarni

Reply via email to