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




agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java
Line 198 (original), 197 (patched)
<https://reviews.apache.org/r/61809/#comment259895>

    ostream can be null here, if closeFileIfNeeded() was called in another 
thread after this thread executes line #191 above but before executing line 
#197. null check can't be removed from here.



agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java
Lines 203 (patched)
<https://reviews.apache.org/r/61809/#comment259896>

    I think, flush() is only called every few minutes and not for every audit 
log. Hence moving a logger statement outside synchronized block here may not 
improve performance much.


- Madhan Neethiraj


On Aug. 22, 2017, 3:14 a.m., Qiang Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61809/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2017, 3:14 a.m.)
> 
> 
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O 
> hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan 
> Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1745
>     https://issues.apache.org/jira/browse/RANGER-1745
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> From the performance and code logic analysis, we should optimize the flush 
> function of HDFSAuditDestination class. The reason is as following:
> 1. Its logic is not clear. There are duplicate code and repeated judgment.
> 2. Through my tests, in the case of large data, the log io will have a big 
> impact on performance.
> 
> 
> Diffs
> -----
> 
>   
> agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java
>  66d8504 
> 
> 
> Diff: https://reviews.apache.org/r/61809/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qiang Zhang
> 
>

Reply via email to