> On 七月 27, 2015, 2:43 p.m., Dapeng Sun wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/log/entity/HiveAuditMetadataLogEntity.java,
> >  line 29
> > <https://reviews.apache.org/r/36832/diff/1/?file=1022150#file1022150line29>
> >
> >     I think Impala may also use **HiveAuditMetadataLogEntity**, Do you 
> > think **DbAuditMetadataLogEntity** is more suitable?
> 
> Colin Ma wrote:
>     thanks for the comments, HiveAuditMetadataLogEntity is only for hive, and 
> there is a GMAuditMetadataLogEntity for generic model. All these should be 
> DbAuditMetadataLogEntity, so I think HiveAuditMetadataLogEntity is better.

I found audit log is working at **SentryPolicyStoreProcessor**, it's not 
specified for HIVE only.


> On 七月 27, 2015, 2:43 p.m., Dapeng Sun wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/log/entity/HiveAuditMetadataLogEntity.java,
> >  line 109
> > <https://reviews.apache.org/r/36832/diff/1/?file=1022150#file1022150line109>
> >
> >     If we return the new StringWriter, will the audit log still work? If 
> > not, we may need to throw the exception.
> 
> Colin Ma wrote:
>     The code here is to process the problems when write the audit log, and 
> just output an empty audit log. I think the exception shouldn't be thrown 
> here and log the problem is ok, because the audit log's problem shouldn't 
> block the normal authorization process.

I don't sure what is the best practice, +0 about issue.


> On 七月 27, 2015, 2:43 p.m., Dapeng Sun wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/log/entity/HiveAuditMetadataLogEntity.java,
> >  line 37
> > <https://reviews.apache.org/r/36832/diff/1/?file=1022150#file1022150line37>
> >
> >     Is there any place need constructor without field? if not, we may need 
> > to delete it or mark it private
> 
> Colin Ma wrote:
>     Yes, this constructor is used in core function and test case.

I found the usage at **JsonLogEntityFactory** and **TestJsonLogEntityFactory**. 
Since AuditMetadataLogEntity has been changed to **abstract**. I think we may 
also need to update the two classes in this jira.


- Dapeng


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


On 七月 28, 2015, 9:14 a.m., Colin Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36832/
> -----------------------------------------------------------
> 
> (Updated 七月 28, 2015, 9:14 a.m.)
> 
> 
> Review request for sentry, Dapeng Sun and shen guoquan.
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Refactor the AuditMetadataLogEntity to support the audit log for generic mdoel
> 
> 
> Diffs
> -----
> 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/log/entity/AuditMetadataLogEntity.java
>  6b63045 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/log/entity/HiveAuditMetadataLogEntity.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/log/entity/TestAuditMetadataLogEntity.java
>  95b51e9 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/log/entity/TestHiveAuditMetadataLogEntity.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/36832/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Colin Ma
> 
>

Reply via email to