ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: Review Request 60696: In different places to achieve the same function using repeat codes, new issue is perhaps generated when these functions are modified.
Date Tue, 11 Jul 2017 13:07:03 GMT

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


Ship it!




Ship It!

- Colm O hEigeartaigh


On July 11, 2017, 2:41 a.m., pengjianhua wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60696/
> -----------------------------------------------------------
> 
> (Updated July 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
> -----
> 
>   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/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> pengjianhua
> 
>


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