You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Colin Ma <ju...@intel.com> on 2016/08/17 05:12:47 UTC

Review Request 51168: SENTRY-1433:GenericServiceClient should support connection pools

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

Review request for sentry, Dapeng Sun and Sravya Tirukkovalur.


Repository: sentry


Description
-------

We might be able to just use PoolClientInvocationHandler in SentryGenericServiceClientFactory. This way, we get the StandbyException handling needed for Sentry HA support for Generic model clients.


Diffs
-----

  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java ee6cdf7 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientFactory.java 980d930 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientPoolFactory.java PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java 353d461 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 9e90af8 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientPoolFactory.java 0164fa6 

Diff: https://reviews.apache.org/r/51168/diff/


Testing
-------


Thanks,

Colin Ma


Re: Review Request 51168: SENTRY-1433:GenericServiceClient should support connection pools

Posted by Colin Ma <ju...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51168/
-----------------------------------------------------------

(Updated Nov. 15, 2016, 8:30 a.m.)


Review request for sentry.


Repository: sentry


Description
-------

We might be able to just use PoolClientInvocationHandler in SentryGenericServiceClientFactory. This way, we get the StandbyException handling needed for Sentry HA support for Generic model clients.


Diffs (updated)
-----

  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java ee6cdf7 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientFactory.java 980d930 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientPoolFactory.java PRE-CREATION 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java d5f4fcb 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java f822497 
  sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientPoolFactory.java 0164fa6 

Diff: https://reviews.apache.org/r/51168/diff/


Testing
-------


Thanks,

Colin Ma


Re: Review Request 51168: SENTRY-1433:GenericServiceClient should support connection pools

Posted by Dapeng Sun <da...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51168/#review146060
-----------------------------------------------------------



Thank Colin, I left some comments.


sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java (line 125)
<https://reviews.apache.org/r/51168/#comment212436>

    Since **SentryGenericServiceClientDefaultImpl** use the addr and port in conf, how about to update the configuration to create different client instance.



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java (line 146)
<https://reviews.apache.org/r/51168/#comment212433>

    Must we change array to arraylist?
    new ArrayList<Endpoint>()?



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java (line 149)
<https://reviews.apache.org/r/51168/#comment212437>

    are all the constructors public? if yes, we could use getConstructor, and remove setAccessible(true).


- Dapeng Sun


On \u516b\u6708 17, 2016, 1:12 p.m., Colin Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51168/
> -----------------------------------------------------------
> 
> (Updated \u516b\u6708 17, 2016, 1:12 p.m.)
> 
> 
> Review request for sentry, Dapeng Sun and Sravya Tirukkovalur.
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> We might be able to just use PoolClientInvocationHandler in SentryGenericServiceClientFactory. This way, we get the StandbyException handling needed for Sentry HA support for Generic model clients.
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java ee6cdf7 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientFactory.java 980d930 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientPoolFactory.java PRE-CREATION 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java 353d461 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 9e90af8 
>   sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientPoolFactory.java 0164fa6 
> 
> Diff: https://reviews.apache.org/r/51168/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Colin Ma
> 
>