You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Xiaomeng Huang <xi...@intel.com> on 2015/01/26 02:41:19 UTC

Review Request 30261: SENTRY-617: Improve grant role to groups

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

Review request for sentry.


Bugs: SENTRY-617
    https://issues.apache.org/jira/browse/SENTRY-617


Repository: sentry


Description
-------

Now if we execute "grant role role1 to group group1, group group2, group group3", we will execute 3 thrift call. 
Currently we have thrift API to support grant/revoke one role to/from a set of groups, so we can improve the client call.


Diffs
-----

  sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 69e97a6 
  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/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java d21a401 

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


Testing
-------


Thanks,

Xiaomeng Huang


Re: Review Request 30261: SENTRY-617: Improve grant role to groups

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

Ship it!


Ship It!

- Colin Ma


On Jan. 26, 2015, 2:55 a.m., Xiaomeng Huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30261/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2015, 2:55 a.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-617
>     https://issues.apache.org/jira/browse/SENTRY-617
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Now if we execute "grant role role1 to group group1, group group2, group group3", we will execute 3 thrift call. 
> Currently we have thrift API to support grant/revoke one role to/from a set of groups, so we can improve the client call.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 69e97a6 
>   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/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java d21a401 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java 4a475ba 
> 
> Diff: https://reviews.apache.org/r/30261/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Xiaomeng Huang
> 
>


Re: Review Request 30261: SENTRY-617: Improve grant role to groups

Posted by Xiaomeng Huang <xi...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30261/
-----------------------------------------------------------

(Updated 一月 26, 2015, 2:55 a.m.)


Review request for sentry.


Changes
-------

add test cases for "grant role to groups"


Bugs: SENTRY-617
    https://issues.apache.org/jira/browse/SENTRY-617


Repository: sentry


Description
-------

Now if we execute "grant role role1 to group group1, group group2, group group3", we will execute 3 thrift call. 
Currently we have thrift API to support grant/revoke one role to/from a set of groups, so we can improve the client call.


Diffs (updated)
-----

  sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 69e97a6 
  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/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java d21a401 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java 4a475ba 

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


Testing
-------


Thanks,

Xiaomeng Huang


Re: Review Request 30261: SENTRY-617: Improve grant role to groups

Posted by Xiaomeng Huang <xi...@intel.com>.

On 一月 26, 2015, 2:10 a.m., Xiaomeng Huang wrote:
> > For this improvment, do we need to add test case like "grant role role1 to group group1, group group2, group group3"?
> > or current test cases covered this already?

thanks for reviewing, fixed and add a test case.


- Xiaomeng


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


On 一月 26, 2015, 2:55 a.m., Xiaomeng Huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30261/
> -----------------------------------------------------------
> 
> (Updated 一月 26, 2015, 2:55 a.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-617
>     https://issues.apache.org/jira/browse/SENTRY-617
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Now if we execute "grant role role1 to group group1, group group2, group group3", we will execute 3 thrift call. 
> Currently we have thrift API to support grant/revoke one role to/from a set of groups, so we can improve the client call.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 69e97a6 
>   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/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java d21a401 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java 4a475ba 
> 
> Diff: https://reviews.apache.org/r/30261/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Xiaomeng Huang
> 
>


Re: Review Request 30261: SENTRY-617: Improve grant role to groups

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



sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java
<https://reviews.apache.org/r/30261/#comment114291>

    check groups != null is ok, if empty, the loop will be skipped.


For this improvment, do we need to add test case like "grant role role1 to group group1, group group2, group group3"?
or current test cases covered this already?

- Colin Ma


On Jan. 26, 2015, 1:41 a.m., Xiaomeng Huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30261/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2015, 1:41 a.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-617
>     https://issues.apache.org/jira/browse/SENTRY-617
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Now if we execute "grant role role1 to group group1, group group2, group group3", we will execute 3 thrift call. 
> Currently we have thrift API to support grant/revoke one role to/from a set of groups, so we can improve the client call.
> 
> 
> Diffs
> -----
> 
>   sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java 69e97a6 
>   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/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java d21a401 
> 
> Diff: https://reviews.apache.org/r/30261/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Xiaomeng Huang
> 
>