ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alok Lal <a...@hortonworks.com>
Subject Re: Review Request 42747: Audit shutdown hook should not only do its processing interruptibly but also have an upper bound on how long it runs
Date Tue, 26 Jan 2016 07:06:55 GMT


> On Jan. 25, 2016, 5:58 p.m., Don Bosco Durai wrote:
> > agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProviderFactory.java,
line 470
> > <https://reviews.apache.org/r/42747/diff/1/?file=1219827#file1219827line470>
> >
> >     Two points:
> >     1. It seems to be a while loop. If provider has cleaned, then shouldn't the
thread exit?
> >     2. Since we are using semaphore, I hope we are co-ordinating the timing. Else,
the provider will stop abruptly

1. Shutdown thread interrupts the cleanup thread before it exits, which will cause cleanup
thread to exit when it tries to wait on semaphore.  It is a while loop so that in the future
if we want to soft boot the audit framework.  Two semaphores allow to know when cleanup is
done.
2. Currently only shutdown thread releases that semaphore.


- Alok


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


On Jan. 25, 2016, 2:27 p.m., Alok Lal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42747/
> -----------------------------------------------------------
> 
> (Updated Jan. 25, 2016, 2:27 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-821
>     https://issues.apache.org/jira/browse/RANGER-821
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Will port this to tip of 0.5, too.  Once approved I would like to treat it as an approval
to port it to 0.5.x, too.
> 
> 
> Diffs
> -----
> 
>   agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProviderFactory.java
723b528 
> 
> Diff: https://reviews.apache.org/r/42747/diff/
> 
> 
> Testing
> -------
> 
> Simulated backlog in HDFS audit provider inside an HDFS plugin.  Issued shutdown of the
NN and then observed that:
> - the shutdown hook was fired
> - the async hook did its work
> - Async thread got interrupted and then exited from its while loop
> - Shutdown hook thread exited
> - NN host services shutdown/pocess went away.
> 
> 
> Thanks,
> 
> Alok Lal
> 
>


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