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


I think this looks much better, thanks. A few comments below. The use of 
reflection/Proxy classes makes the code a bit harder to follow, so if you could 
add a few comments on that it might be helpeful. I understand why it's useful 
here though.


sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceBaseClient.java
<https://reviews.apache.org/r/30363/#comment115760>

    Why do we need this interface? All it does is add the "close()" method. Can 
you just add "close()" to the SentryPolicyServiceClient interface?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java
<https://reviews.apache.org/r/30363/#comment115762>

    spelling avaible



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java
<https://reviews.apache.org/r/30363/#comment115763>

    why are you setting HA_ENABLED = false?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryClientInvocationHandler.java
<https://reviews.apache.org/r/30363/#comment115768>

    why would you want to call a method that's not accessible?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryClientInvocationHandler.java
<https://reviews.apache.org/r/30363/#comment115761>

    Should you add a Preconditions check here to verify that the "close" method 
doesn't is a version that takes no params?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientPoolFactory.java
<https://reviews.apache.org/r/30363/#comment115767>

    Why are you setting this to false here?


- Lenni Kuff


On Jan. 28, 2015, 1:55 p.m., Dapeng Sun wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30363/
> -----------------------------------------------------------
> 
> (Updated Jan. 28, 2015, 1:55 p.m.)
> 
> 
> Review request for sentry and Lenni Kuff.
> 
> 
> Bugs: SENTRY-296
>     https://issues.apache.org/jira/browse/SENTRY-296
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Since the change in **SENTRY-600 Refactor sentry client factory for "high 
> availability" and "connection pool"** is too complicated, I refactor this 
> part, this review request also merge **SENTRY-601 Create connection pool 
> factory**
> 
> I think this patch might minimized the code change
> * Kept the method **public static SentryPolicyServiceClient 
> create(Configuration conf) throws Exception**
> * Add **Generic Type** support to HAClientInvocationHandler and 
> PoolClientInvocationHandler, it will make integration with other client more 
> easily
> * Put **Connection pool instance** into PoolInvocationHandler, it will make 
> Client connection can be pooled.
> 
> 
> Diffs
> -----
> 
>   pom.xml 60a9f4a 
>   sentry-provider/sentry-provider-db/pom.xml 6116cd5 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceBaseClient.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java
>  962228f 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java
>  c6e265f 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryClientInvocationHandler.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java
>  574f23c 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientPoolFactory.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java
>  ddc5930 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerForPoolHAWithoutKerberos.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerForPoolWithoutKerberos.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceClientPool.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceForPoolHAWithKerberos.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceForPoolWithKerberos.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java
>  ca64ce1 
> 
> Diff: https://reviews.apache.org/r/30363/diff/
> 
> 
> Testing
> -------
> 
> Unit Tests passed
> 
> 
> Thanks,
> 
> Dapeng Sun
> 
>

Reply via email to