----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47897/#review135154 -----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/util/PolicyRefresher.java (line 78) <https://reviews.apache.org/r/47897/#comment200177> 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. - Madhan Neethiraj 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 > >
