> On Dec. 14, 2023, 11:31 p.m., Madhan Neethiraj wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerFileBasedTagRetriever.java
> > Lines 44 (patched)
> > <https://reviews.apache.org/r/74795/diff/1/?file=2284298#file2284298line44>
> >
> >     Consider replacing isInitial with currentTagFileIndex == 0.

That will always return the entire tag file to the caller. It's better to keep 
track of first-time call in a separate state variable (like isInitial).


- Abhay


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


On Dec. 14, 2023, 10:28 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74795/
> -----------------------------------------------------------
> 
> (Updated Dec. 14, 2023, 10:28 p.m.)
> 
> 
> Review request for ranger, madhan, Madhan Neethiraj, Pradeep Agrawal, Ramesh 
> Mani, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4609
>     https://issues.apache.org/jira/browse/RANGER-4609
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> As a part of test infrastructure, a file-based tag retriever class is 
> created. When the TagEnricher is configured with this class, a plugin gets 
> the tag from the configured file.
> 
> Please refer to the Service-definition for tag for tagRetrieverClassName in 
> enricherOptions.
> 
> If the value of this option is set to 
> 
> org.apache.ranger.plugin.contextenricher.RangerFileBasedTagRetriever
> 
> then, the tags will be fetched for a file named by the value of the enricher 
> option 
> 
> "serviceTagsFileName".
> 
> "contextEnrichers":[
> {
> "itemId": 1,
> "name" : "TagEnricher",
> "enricher" : "org.apache.ranger.plugin.contextenricher.RangerTagEnricher",
> "enricherOptions" : {
> "tagRetrieverClassName": 
> "org.apache.ranger.plugin.contextenricher.RangerAdminTagRetriever",
> "tagRefresherPollingInterval": 60000
> }
> }]
> This enhancement supports specifying another enricher option "tagFileCount". 
> When this is set to a value greater than 0, each successive call made to 
> fetch tags will provide tags from the file name obtained by adding a suffix 
> [0.. tagFileCount-1].json to the file named by the option 
> "serviceTagsFileName". When tag-delta files are set up with appropriate 
> suffixes, this simulates the fetching of successive tag-deltas for processing.
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerFileBasedTagRetriever.java
>  448c665fc 
> 
> 
> Diff: https://reviews.apache.org/r/74795/diff/1/
> 
> 
> Testing
> -------
> 
> Compiled and ran all unit tests successfully
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>

Reply via email to