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

(Updated 七月 11, 2017, 2:41 a.m.)


Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O 
hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan 
Neethiraj, Velmurugan Periasamy, and Qiang Zhang.


Bugs: RANGER-1678
    https://issues.apache.org/jira/browse/RANGER-1678


Repository: ranger


Description
-------

In agents-audit module, there are following two places of writing audit logs to 
solr: 
1. org.apache.ranger.audit.provider.solr.SolrAuditProvider.
2. org.apache.ranger.audit.destination.SolrAuditDestination.
Above classes use the same method( "MiscUtil.executePrivilegedAction") to send 
the audit logs to solr. Codes is as following
final UpdateResponse response = MiscUtil.executePrivilegedAction(new 
PrivilegedExceptionAction<UpdateResponse>() {
            @Override
            public UpdateResponse run() throws Exception {
                return solrClient.add(docs);
            }
 }); 

We should extract the common method to let our codes more cleaner and reduce 
the possibility of new issue.


Diffs (updated)
-----

  
agents-audit/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java
 14ad791 
  
agents-audit/src/main/java/org/apache/ranger/audit/provider/solr/SolrAuditProvider.java
 e0c192c 
  agents-audit/src/main/java/org/apache/ranger/audit/utils/SolrAppUtil.java 
PRE-CREATION 


Diff: https://reviews.apache.org/r/60696/diff/3/

Changes: https://reviews.apache.org/r/60696/diff/2-3/


Testing
-------


Thanks,

pengjianhua

Reply via email to