> On 八月 25, 2017, 6:51 a.m., Madhan Neethiraj wrote: > > agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java > > Lines 203 (patched) > > <https://reviews.apache.org/r/61809/diff/1/?file=1801337#file1801337line206> > > > > 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.
You are right. From the overall code, this synchronization control logic does have a problem. I will fix it. - Qiang ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61809/#review183827 ----------------------------------------------------------- On 八月 27, 2017, 11:05 p.m., Qiang Zhang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61809/ > ----------------------------------------------------------- > > (Updated 八月 27, 2017, 11:05 p.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 > >
