You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Ramesh Mani <rm...@hortonworks.com> on 2017/08/03 17:51:25 UTC

Re: Review Request 58272: Ranger-1502: Solr shutdown does not cause the audit log file to be flushed and closed

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


Ship it!




Ship It!

- Ramesh Mani


On April 7, 2017, 9:48 p.m., Yan Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58272/
> -----------------------------------------------------------
> 
> (Updated April 7, 2017, 9:48 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> The current audit stream close mechanism uses a Java shutdown hook registered with Hadoop's ShutdownHookManager. Solr shutdown, however, somehow does not cause the shutdown hook to be invoked, potentially resulting lost audit logs. We are experiencing lost logs toward HDFS audit destination.
> 
> The fix is to add invocation of the shutdown hook from the close() call of the Solr's AuthorizationPlugin interface, in addition to the existing invocation mechanism from the JVM invocation of shutdown hooks.
> 
> 
> Diffs
> -----
> 
>   agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProviderFactory.java b37011e6 
>   plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java bf22b476 
> 
> 
> Diff: https://reviews.apache.org/r/58272/diff/1/
> 
> 
> Testing
> -------
> 
> automated and manual
> 
> 
> Thanks,
> 
> Yan Zhou
> 
>