ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: Review Request 47897: RANGER-996 - The PolicyRefresher doesn't cache policies if the directory doesn't already exist
Date Fri, 27 May 2016 10:05:10 GMT


> On May 27, 2016, 5:37 a.m., Madhan Neethiraj wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/util/PolicyRefresher.java,
line 78
> > <https://reviews.apache.org/r/47897/diff/1/?file=1395466#file1395466line78>
> >
> >     mkdirs() can throw SecurityException, which will cause PolicyRefresh constructor
to fail. http://docs.oracle.com/javase/6/docs/api/java/io/File.html#mkdirs%28%29
> >     
> >     Better to move this logic of creating parent diretories to saveToCache(), just
before line #319 (or #313?). This will check for parent directory existence on every save
attempt - hence enabling recovery (by fixing the permission issue externally) without requiring
restart of the component.

Good idea Madhan. Please take a look at the updated diff and let me know what you think.


- Colm


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


On May 26, 2016, 3:30 p.m., Colm O hEigeartaigh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47897/
> -----------------------------------------------------------
> 
> (Updated May 26, 2016, 3:30 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-996
>     https://issues.apache.org/jira/browse/RANGER-996
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> The PolicyRefresher doesn't cache policies if the directory doesn't already exist
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/util/PolicyRefresher.java 91a23b3

> 
> Diff: https://reviews.apache.org/r/47897/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Colm O hEigeartaigh
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message