You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Sun Dapeng <da...@intel.com> on 2014/09/24 03:53:59 UTC
Review Request 25979: SENTRY-463 Refactor SentryServiceClientFactory:
change "create SentryPolicyServiceClient" to static
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25979/
-----------------------------------------------------------
Review request for sentry, Arun Suresh, Prasad Mujumdar, and Sravya Tirukkovalur.
Bugs: SENTRY-463
https://issues.apache.org/jira/browse/SENTRY-463
Repository: sentry
Description
-------
* In **SentryServiceClientFactory** the method **public SentryPolicyServiceClient create(Configuration conf) throws Exception** can be static
* Make all **SentryPolicyServiceClient** are called from **SentryServiceClientFactory**
* Change **SentryPolicyServiceClient** to a interface, **SentryPolicyServiceClientDefaultImpl** is default implementation
Diffs
-----
sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 4126341
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java 2b978d5
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java 38bf8b2
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/SimpleDBProviderBackend.java b66037a
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java 0668912
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java PRE-CREATION
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 11545a5
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java 38cb39b
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java cc12099
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java f251ebc
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPolicyImport.java a67556b
Diff: https://reviews.apache.org/r/25979/diff/
Testing
-------
All unitTest passed in local environment.
Thanks,
Sun Dapeng
Re: Review Request 25979: SENTRY-463 Refactor
SentryServiceClientFactory:
change "create SentryPolicyServiceClient" to static
Posted by Prasad Mujumdar <pr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25979/#review60745
-----------------------------------------------------------
Ship it!
- Prasad Mujumdar
On Oct. 27, 2014, 6:39 a.m., Dapeng Sun wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25979/
> -----------------------------------------------------------
>
> (Updated Oct. 27, 2014, 6:39 a.m.)
>
>
> Review request for sentry, Arun Suresh, Lenni Kuff, Prasad Mujumdar, and Sravya Tirukkovalur.
>
>
> Bugs: SENTRY-463
> https://issues.apache.org/jira/browse/SENTRY-463
>
>
> Repository: sentry
>
>
> Description
> -------
>
> * In **SentryServiceClientFactory** the method **public SentryPolicyServiceClient create(Configuration conf) throws Exception** can be static
> * Make all **SentryPolicyServiceClient** are called from **SentryServiceClientFactory**
> * Change **SentryPolicyServiceClient** to a interface, **SentryPolicyServiceClientDefaultImpl** is default implementation
>
>
> Diffs
> -----
>
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java ac45746
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java 2b978d5
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java 38bf8b2
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/SimpleDBProviderBackend.java b66037a
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java 65905f5
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java PRE-CREATION
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 11545a5
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java ff6cff4
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java cc12099
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java f251ebc
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPolicyImport.java a67556b
>
> Diff: https://reviews.apache.org/r/25979/diff/
>
>
> Testing
> -------
>
> All unitTest passed in local environment.
>
>
> Thanks,
>
> Dapeng Sun
>
>
Re: Review Request 25979: SENTRY-463 Refactor
SentryServiceClientFactory:
change "create SentryPolicyServiceClient" to static
Posted by Sun Dapeng <da...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25979/
-----------------------------------------------------------
(Updated 十月 27, 2014, 2:39 p.m.)
Review request for sentry, Arun Suresh, Lenni Kuff, Prasad Mujumdar, and Sravya Tirukkovalur.
Changes
-------
Updated patch according Prasad's comments, thank Prasad for his reply and comments
Bugs: SENTRY-463
https://issues.apache.org/jira/browse/SENTRY-463
Repository: sentry
Description
-------
* In **SentryServiceClientFactory** the method **public SentryPolicyServiceClient create(Configuration conf) throws Exception** can be static
* Make all **SentryPolicyServiceClient** are called from **SentryServiceClientFactory**
* Change **SentryPolicyServiceClient** to a interface, **SentryPolicyServiceClientDefaultImpl** is default implementation
Diffs (updated)
-----
sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java ac45746
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java 2b978d5
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java 38bf8b2
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/SimpleDBProviderBackend.java b66037a
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java 65905f5
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java PRE-CREATION
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 11545a5
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java ff6cff4
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java cc12099
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java f251ebc
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPolicyImport.java a67556b
Diff: https://reviews.apache.org/r/25979/diff/
Testing
-------
All unitTest passed in local environment.
Thanks,
Sun Dapeng
Re: Review Request 25979: SENTRY-463 Refactor
SentryServiceClientFactory:
change "create SentryPolicyServiceClient" to static
Posted by Sun Dapeng <da...@intel.com>.
> On 十月 21, 2014, 8:24 a.m., Prasad Mujumdar wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java, line 107
> > <https://reviews.apache.org/r/25979/diff/1/?file=704005#file704005line107>
> >
> > It might be good idea to add a private constructor so that it won't be instanciated directly in future patches.
Good idea, thank Prasad!
- Sun
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25979/#review57472
-----------------------------------------------------------
On 十月 9, 2014, 1:48 p.m., Sun Dapeng wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25979/
> -----------------------------------------------------------
>
> (Updated 十月 9, 2014, 1:48 p.m.)
>
>
> Review request for sentry, Arun Suresh, Lenni Kuff, Prasad Mujumdar, and Sravya Tirukkovalur.
>
>
> Bugs: SENTRY-463
> https://issues.apache.org/jira/browse/SENTRY-463
>
>
> Repository: sentry
>
>
> Description
> -------
>
> * In **SentryServiceClientFactory** the method **public SentryPolicyServiceClient create(Configuration conf) throws Exception** can be static
> * Make all **SentryPolicyServiceClient** are called from **SentryServiceClientFactory**
> * Change **SentryPolicyServiceClient** to a interface, **SentryPolicyServiceClientDefaultImpl** is default implementation
>
>
> Diffs
> -----
>
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 4126341
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java 2b978d5
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java 38bf8b2
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/SimpleDBProviderBackend.java b66037a
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java 0668912
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java PRE-CREATION
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 11545a5
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java 38cb39b
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java cc12099
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java f251ebc
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPolicyImport.java a67556b
>
> Diff: https://reviews.apache.org/r/25979/diff/
>
>
> Testing
> -------
>
> All unitTest passed in local environment.
>
>
> Thanks,
>
> Sun Dapeng
>
>
Re: Review Request 25979: SENTRY-463 Refactor
SentryServiceClientFactory:
change "create SentryPolicyServiceClient" to static
Posted by Prasad Mujumdar <pr...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25979/#review57472
-----------------------------------------------------------
sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java
<https://reviews.apache.org/r/25979/#comment98188>
It might be good idea to add a private constructor so that it won't be instanciated directly in future patches.
- Prasad Mujumdar
On Oct. 9, 2014, 5:48 a.m., Sun Dapeng wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25979/
> -----------------------------------------------------------
>
> (Updated Oct. 9, 2014, 5:48 a.m.)
>
>
> Review request for sentry, Arun Suresh, Lenni Kuff, Prasad Mujumdar, and Sravya Tirukkovalur.
>
>
> Bugs: SENTRY-463
> https://issues.apache.org/jira/browse/SENTRY-463
>
>
> Repository: sentry
>
>
> Description
> -------
>
> * In **SentryServiceClientFactory** the method **public SentryPolicyServiceClient create(Configuration conf) throws Exception** can be static
> * Make all **SentryPolicyServiceClient** are called from **SentryServiceClientFactory**
> * Change **SentryPolicyServiceClient** to a interface, **SentryPolicyServiceClientDefaultImpl** is default implementation
>
>
> Diffs
> -----
>
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 4126341
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java 2b978d5
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java 38bf8b2
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/SimpleDBProviderBackend.java b66037a
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java 0668912
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java PRE-CREATION
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 11545a5
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java 38cb39b
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java cc12099
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java f251ebc
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPolicyImport.java a67556b
>
> Diff: https://reviews.apache.org/r/25979/diff/
>
>
> Testing
> -------
>
> All unitTest passed in local environment.
>
>
> Thanks,
>
> Sun Dapeng
>
>
Re: Review Request 25979: SENTRY-463 Refactor
SentryServiceClientFactory:
change "create SentryPolicyServiceClient" to static
Posted by Sun Dapeng <da...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25979/
-----------------------------------------------------------
(Updated 十月 9, 2014, 1:48 p.m.)
Review request for sentry, Arun Suresh, Lenni Kuff, Prasad Mujumdar, and Sravya Tirukkovalur.
Changes
-------
Add Lenni.
Bugs: SENTRY-463
https://issues.apache.org/jira/browse/SENTRY-463
Repository: sentry
Description
-------
* In **SentryServiceClientFactory** the method **public SentryPolicyServiceClient create(Configuration conf) throws Exception** can be static
* Make all **SentryPolicyServiceClient** are called from **SentryServiceClientFactory**
* Change **SentryPolicyServiceClient** to a interface, **SentryPolicyServiceClientDefaultImpl** is default implementation
Diffs
-----
sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 4126341
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java 2b978d5
sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentryMetastorePostEventListener.java 38bf8b2
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/SimpleDBProviderBackend.java b66037a
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java 0668912
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java PRE-CREATION
sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceClientFactory.java 11545a5
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java 38cb39b
sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java cc12099
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java f251ebc
sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPolicyImport.java a67556b
Diff: https://reviews.apache.org/r/25979/diff/
Testing
-------
All unitTest passed in local environment.
Thanks,
Sun Dapeng